[commit: ghc] master: ApiAnnotations: misplaced AnnComma for squals production (7136126)

git at git.haskell.org git at git.haskell.org
Fri May 8 09:17:39 UTC 2015


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

On branch  : master
Link       : http://ghc.haskell.org/trac/ghc/changeset/713612674634754edd17264e688f0479d943d8d2/ghc

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

commit 713612674634754edd17264e688f0479d943d8d2
Author: Alan Zimmerman <alan.zimm at gmail.com>
Date:   Fri May 8 11:18:28 2015 +0200

    ApiAnnotations: misplaced AnnComma for squals production
    
    Summary:
    The parser production for squals has
    
        : squals ',' transformqual
                 {% addAnnotation (gl $ last $ unLoc $1) AnnComma (gl $2) >>
                    ams (sLL $1 $> ()) (fst $ unLoc $3) >>
                    return (sLL $1 $> [sLL $1 $> ((snd $ unLoc $3) (reverse (unLoc $1)))]) }
    
    This attaches the comma to the wrong part of the squals, as it is
    generated in reverse order.
    
    Test Plan: ./validate
    
    Reviewers: hvr, austin
    
    Reviewed By: austin
    
    Subscribers: bgamari, thomie, mpickering
    
    Differential Revision: https://phabricator.haskell.org/D846
    
    GHC Trac Issues: #10312


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

713612674634754edd17264e688f0479d943d8d2
 compiler/parser/Parser.y                           |   2 +-
 testsuite/tests/ghc-api/annotations/.gitignore     |   1 +
 testsuite/tests/ghc-api/annotations/Makefile       |   8 +
 testsuite/tests/ghc-api/annotations/T10312.stderr  |   8 +
 testsuite/tests/ghc-api/annotations/T10312.stdout  | 485 +++++++++++++++++++++
 testsuite/tests/ghc-api/annotations/Test10312.hs   |  79 ++++
 testsuite/tests/ghc-api/annotations/all.T          |   1 +
 .../ghc-api/annotations/{t10255.hs => t10312.hs}   |   2 +-
 8 files changed, 584 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 713612674634754edd17264e688f0479d943d8d2


More information about the ghc-commits mailing list