[commit: ghc] wip/7.10-api-annots: ApiAnnotations: misplaced AnnComma for squals production (bd2bfe2)

git at git.haskell.org git at git.haskell.org
Fri May 8 17:02:32 UTC 2015


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

On branch  : wip/7.10-api-annots
Link       : http://ghc.haskell.org/trac/ghc/changeset/bd2bfe29480fe3f845bea1fafd1d9787cc14eed8/ghc

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

commit bd2bfe29480fe3f845bea1fafd1d9787cc14eed8
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
    
    (cherry picked from commit 713612674634754edd17264e688f0479d943d8d2)


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

bd2bfe29480fe3f845bea1fafd1d9787cc14eed8
 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 bd2bfe29480fe3f845bea1fafd1d9787cc14eed8


More information about the ghc-commits mailing list