[commit: ghc] master: ApiAnnotations : pquals production adds AnnVbar in the wrong place (fe38195)
git at git.haskell.org
git at git.haskell.org
Mon May 11 13:28:04 UTC 2015
Repository : ssh://git@git.haskell.org/ghc
On branch : master
Link : http://ghc.haskell.org/trac/ghc/changeset/fe38195eb783fc2f2f2d5ef50fb665b06fd15e82/ghc
>---------------------------------------------------------------
commit fe38195eb783fc2f2f2d5ef50fb665b06fd15e82
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
>---------------------------------------------------------------
fe38195eb783fc2f2f2d5ef50fb665b06fd15e82
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 +
.../annotations/{exampleTest.hs => t10357.hs} | 20 ++--
8 files changed, 177 insertions(+), 8 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 fe38195eb783fc2f2f2d5ef50fb665b06fd15e82
More information about the ghc-commits
mailing list