[GHC] #10357: ApiAnnotations : pquals production adds AnnVbar in the wrong place
GHC
ghc-devs at haskell.org
Sun Apr 26 18:47:22 UTC 2015
#10357: ApiAnnotations : pquals production adds AnnVbar in the wrong place
-------------------------------------+-------------------------------------
Reporter: alanz | Owner: alanz
Type: bug | Status: new
Priority: normal | Milestone: 7.10.2
Component: Compiler | Version: 7.10.1
(Parser) | Operating System: Unknown/Multiple
Keywords: | Type of failure: None/Unknown
ApiAnnotations | Blocked By:
Architecture: | Related Tickets:
Unknown/Multiple |
Test Case: |
Blocking: |
Differential Revisions: |
-------------------------------------+-------------------------------------
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`.
--
Ticket URL: <http://ghc.haskell.org/trac/ghc/ticket/10357>
GHC <http://www.haskell.org/ghc/>
The Glasgow Haskell Compiler
More information about the ghc-tickets
mailing list