[commit: ghc] ghc-7.10: ApiAnnotations : pquals production adds AnnVbar in the wrong place (6fea082)

git at git.haskell.org git at git.haskell.org
Mon May 11 22:30:19 UTC 2015


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

On branch  : ghc-7.10
Link       : http://ghc.haskell.org/trac/ghc/changeset/6fea0826ee73e72aedff3b7aca57855b197c0655/ghc

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

commit 6fea0826ee73e72aedff3b7aca57855b197c0655
Author: Alan Zimmerman <alan.zimm at gmail.com>
Date:   Mon May 11 15:28:55 2015 +0200

    ApiAnnotations : pquals production adds AnnVbar in the wrong place
    
    Summary:
    The Parser.y production for pquals is
    
        pquals :: { Located [[LStmt RdrName (LHsExpr RdrName)]] }
            : squals '|' pquals
                             {% addAnnotation (gl $ last $ unLoc $1) AnnVbar (gl $2) >>
                                return (sLL $1 $> (reverse (unLoc $1) : unLoc $3)) }
            | squals         { L (getLoc $1) [reverse (unLoc $1)] }
    
    The squals are returned in reverse order, so the AnnVbar should be
    attached to the head of the list, not the last.
    
    Test Plan: ./validate
    
    Reviewers: hvr, austin
    
    Reviewed By: austin
    
    Subscribers: thomie, mpickering
    
    Differential Revision: https://phabricator.haskell.org/D869
    
    GHC Trac Issues: #10357
    
    (cherry picked from commit fe38195eb783fc2f2f2d5ef50fb665b06fd15e82)


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

6fea0826ee73e72aedff3b7aca57855b197c0655
 compiler/parser/Parser.y                           |   2 +-
 testsuite/tests/ghc-api/annotations/.gitignore     |   1 +
 testsuite/tests/ghc-api/annotations/Makefile       |   8 ++
 testsuite/tests/ghc-api/annotations/T10357.stderr  |  30 ++++++
 testsuite/tests/ghc-api/annotations/T10357.stdout  | 110 +++++++++++++++++++++
 testsuite/tests/ghc-api/annotations/Test10357.hs   |  13 +++
 testsuite/tests/ghc-api/annotations/all.T          |   1 +
 .../ghc-api/annotations/{t10255.hs => t10357.hs}   |  14 ++-
 8 files changed, 177 insertions(+), 2 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 6fea0826ee73e72aedff3b7aca57855b197c0655


More information about the ghc-commits mailing list