
#10256: parser: API Annotations : guardquals1 does not annotate commas properly -------------------------------------+------------------------------------- Reporter: alanz | Owner: alanz Type: bug | Status: new Priority: normal | Milestone: 7.10.2 Component: Compiler | Version: 7.10.1 (Parser) | Keywords: Resolution: | ApiAnnotations Operating System: Unknown/Multiple | Architecture: Type of failure: None/Unknown | Unknown/Multiple Blocked By: | Test Case: Related Tickets: | Blocking: | Differential Revisions: -------------------------------------+------------------------------------- Description changed by alanz: Old description:
The `squals` production includes
{{{ | squals ',' qual {% addAnnotation (gl $ head $ unLoc $1) AnnComma (gl $2) >> return (sLL $1 $> ($3 : unLoc $1)) } }}}
The `AnnComma` should be attached to `(gl $ last $ unLoc $1)`, rather than the head.
New description: 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. -- -- Ticket URL: http://ghc.haskell.org/trac/ghc/ticket/10256#comment:1 GHC http://www.haskell.org/ghc/ The Glasgow Haskell Compiler