[commit: ghc] wip/api-annots: ApiAnnotations : pquals production adds AnnVbar in the wrong place (3e6f170)
git at git.haskell.org
git at git.haskell.org
Sat May 9 14:17:52 UTC 2015
Repository : ssh://git@git.haskell.org/ghc
On branch : wip/api-annots
Link : http://ghc.haskell.org/trac/ghc/changeset/3e6f17090ade0a5acc83fa8cfcf45cd3e31860ba/ghc
>---------------------------------------------------------------
commit 3e6f17090ade0a5acc83fa8cfcf45cd3e31860ba
Author: Alan Zimmerman <alan.zimm at gmail.com>
Date: Fri May 8 12:08:22 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
Subscribers: thomie, mpickering
Differential Revision: https://phabricator.haskell.org/D869
GHC Trac Issues: #10357
Conflicts:
testsuite/tests/ghc-api/annotations/.gitignore
testsuite/tests/ghc-api/annotations/Makefile
testsuite/tests/ghc-api/annotations/all.T
>---------------------------------------------------------------
3e6f17090ade0a5acc83fa8cfcf45cd3e31860ba
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 3e6f17090ade0a5acc83fa8cfcf45cd3e31860ba
More information about the ghc-commits
mailing list