[commit: ghc] wip/api-annot-tweaks-7.10: API Annotations documentation update, parsing issue, add example test (5b7a797)
git at git.haskell.org
git at git.haskell.org
Fri Jan 23 15:28:09 UTC 2015
Repository : ssh://git@git.haskell.org/ghc
On branch : wip/api-annot-tweaks-7.10
Link : http://ghc.haskell.org/trac/ghc/changeset/5b7a79780b709f4a9d1c110bb786bae1031d1614/ghc
>---------------------------------------------------------------
commit 5b7a79780b709f4a9d1c110bb786bae1031d1614
Author: Alan Zimmerman <alan.zimm at gmail.com>
Date: Mon Jan 19 08:15:18 2015 -0600
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
(cherry picked from commit 851ed7211fb18fea938be84c99b6389f6762b30d)
>---------------------------------------------------------------
5b7a79780b709f4a9d1c110bb786bae1031d1614
compiler/basicTypes/BasicTypes.hs | 30 ++++----
compiler/basicTypes/DataCon.hs | 2 +
compiler/basicTypes/RdrName.hs | 2 +
compiler/hsSyn/HsBinds.hs | 28 +++++++
compiler/hsSyn/HsDecls.hs | 51 +++++++++++-
compiler/hsSyn/HsExpr.hs | 90 ++++++++++++++++++++++
compiler/hsSyn/HsImpExp.hs | 17 +++-
compiler/hsSyn/HsLit.hs | 4 +-
compiler/hsSyn/HsPat.hs | 24 ++++++
compiler/hsSyn/HsSyn.hs | 11 ++-
compiler/hsSyn/HsTypes.hs | 60 ++++++++++++++-
compiler/parser/ApiAnnotation.hs | 16 ++--
compiler/parser/Lexer.x | 14 ++--
compiler/parser/Parser.y | 5 +-
compiler/prelude/ForeignCall.hs | 2 +
compiler/types/Class.hs | 2 +
testsuite/tests/ghc-api/annotations/.gitignore | 1 +
testsuite/tests/ghc-api/annotations/Makefile | 6 +-
testsuite/tests/ghc-api/annotations/all.T | 1 +
.../annotations/{parseTree.hs => exampleTest.hs} | 24 ++++--
.../{parseTree.stdout => exampleTest.stdout} | 20 ++---
21 files changed, 352 insertions(+), 58 deletions(-)
Diff suppressed because of size. To see it, use:
git diff-tree --root --patch-with-stat --no-color --find-copies-harder --ignore-space-at-eol --cc 5b7a79780b709f4a9d1c110bb786bae1031d1614
More information about the ghc-commits
mailing list