API Annotations documentation update, parsing issue, add example test
authorAlan Zimmerman <alan.zimm@gmail.com>
Mon, 19 Jan 2015 14:15:18 +0000 (08:15 -0600)
committerAustin Seipp <austin@well-typed.com>
Mon, 19 Jan 2015 14:15:18 +0000 (08:15 -0600)
commit851ed7211fb18fea938be84c99b6389f6762b30d
tree0f24080f6c04578860b00e1b6e9c55a8f4f4cbaa
parent960e3c92eace7f9b584cfc6f6eb69a37cd3d88f8
API Annotations documentation update, parsing issue, add example test

Summary:
Add a reference note to each AnnKeywordId haddock comment so GHC
developers will have an idea why they are there.

Add a new test to ghc-api/annotations to serve as a template for other
GHC developers when they need to update the parser. It provides output
which checks that each SrcSpan that an annotation is attached to
actually appears in the `ParsedSource`, and lists the individual
annotations. The idea is that a developer writes a version of this
which parses a sample file using whatever syntax is changed in
Parser.y, and can then check that all the annotations come through.

Depends on D538

Test Plan: ./validate

Reviewers: simonpj, hvr, austin

Reviewed By: austin

Subscribers: thomie, jstolarek

Differential Revision: https://phabricator.haskell.org/D620
21 files changed:
compiler/basicTypes/BasicTypes.hs
compiler/basicTypes/DataCon.hs
compiler/basicTypes/RdrName.hs
compiler/hsSyn/HsBinds.hs
compiler/hsSyn/HsDecls.hs
compiler/hsSyn/HsExpr.hs
compiler/hsSyn/HsImpExp.hs
compiler/hsSyn/HsLit.hs
compiler/hsSyn/HsPat.hs
compiler/hsSyn/HsSyn.hs
compiler/hsSyn/HsTypes.hs
compiler/parser/ApiAnnotation.hs
compiler/parser/Lexer.x
compiler/parser/Parser.y
compiler/prelude/ForeignCall.hs
compiler/types/Class.hs
testsuite/tests/ghc-api/annotations/.gitignore
testsuite/tests/ghc-api/annotations/Makefile
testsuite/tests/ghc-api/annotations/all.T
testsuite/tests/ghc-api/annotations/exampleTest.hs [new file with mode: 0644]
testsuite/tests/ghc-api/annotations/exampleTest.stdout [new file with mode: 0644]