[commit: ghc] master: parser: API Annotations : guardquals1 does not annotate commas properly (9eab6fe)

git at git.haskell.org git at git.haskell.org
Tue Apr 14 06:20:23 UTC 2015


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

On branch  : master
Link       : http://ghc.haskell.org/trac/ghc/changeset/9eab6feed44ad8beb6703d2e27ce47a8f79d0f49/ghc

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

commit 9eab6feed44ad8beb6703d2e27ce47a8f79d0f49
Author: Alan Zimmerman <alan.zimm at gmail.com>
Date:   Tue Apr 14 01:17:48 2015 -0500

    parser: API Annotations : guardquals1 does not annotate commas properly
    
    The `guardquals1` production includes
    
       : guardquals1 ',' qual  {% addAnnotation (gl $ last $ unLoc $1) AnnComma
                                                 (gl $2) >>
                                   return (sLL $1 $> ($3 : unLoc $1)) }
    
    The AnnComma should be attached to `(gl $ head $ unLoc $1)`, rather than
    `last`.
    
    Reviewed By: austin
    
    Differential Revision: https://phabricator.haskell.org/D818
    
    GHC Trac Issues: #10256


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

9eab6feed44ad8beb6703d2e27ce47a8f79d0f49
 compiler/parser/Parser.y                           |   2 +-
 .../tests/ghc-api/annotations/AnnotationTuple.hs   |   8 +-
 .../tests/ghc-api/annotations/exampleTest.stdout   | 138 ++++++++++--------
 .../tests/ghc-api/annotations/parseTree.stdout     | 158 ++++++++++++---------
 4 files changed, 174 insertions(+), 132 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 9eab6feed44ad8beb6703d2e27ce47a8f79d0f49


More information about the ghc-commits mailing list