[commit: ghc] master: API Annotations documentation update, parsing issue, add example test (851ed72)

git at git.haskell.org git at git.haskell.org
Mon Jan 19 14:13:50 UTC 2015


Repository : ssh://git@git.haskell.org/ghc

On branch  : master
Link       : http://ghc.haskell.org/trac/ghc/changeset/851ed7211fb18fea938be84c99b6389f6762b30d/ghc

>---------------------------------------------------------------

commit 851ed7211fb18fea938be84c99b6389f6762b30d
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


>---------------------------------------------------------------

851ed7211fb18fea938be84c99b6389f6762b30d
 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 851ed7211fb18fea938be84c99b6389f6762b30d


More information about the ghc-commits mailing list