[commit: ghc] wip/7.10-api-annots2: ApiAnnotations : pquals production adds AnnVbar in the wrong place (6b862e3)
git at git.haskell.org
git at git.haskell.org
Mon May 11 21:37:05 UTC 2015
Repository : ssh://git@git.haskell.org/ghc
On branch : wip/7.10-api-annots2
Link : http://ghc.haskell.org/trac/ghc/changeset/6b862e3baed1100ee90fc8bfad0612d468a3937e/ghc
>---------------------------------------------------------------
commit 6b862e3baed1100ee90fc8bfad0612d468a3937e
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)
>---------------------------------------------------------------
6b862e3baed1100ee90fc8bfad0612d468a3937e
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 6b862e3baed1100ee90fc8bfad0612d468a3937e
More information about the ghc-commits
mailing list