Opened 3 years ago

Closed 3 years ago

#10256 closed bug (fixed)

parser: API Annotations : guardquals1 does not annotate commas properly

Reported by: alanz Owned by: alanz
Priority: normal Milestone: 7.10.2
Component: Compiler (Parser) Version: 7.10.1
Keywords: ApiAnnotations Cc:
Operating System: Unknown/Multiple Architecture: Unknown/Multiple
Type of failure: None/Unknown Test Case:
Blocked By: Blocking:
Related Tickets: Differential Rev(s): Phab:D818
Wiki Page:

Description (last modified by alanz)

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.

Change History (5)

comment:1 Changed 3 years ago by alanz

Description: modified (diff)
Summary: parser: API Annotations : squals does not annotate commas properlyparser: API Annotations : guardquals1 does not annotate commas properly

comment:2 Changed 3 years ago by alanz

Differential Rev(s): Phab:D818

comment:3 Changed 3 years ago by alanz

Status: newpatch

comment:4 Changed 3 years ago by Austin Seipp <austin@…>

In 9eab6feed44ad8beb6703d2e27ce47a8f79d0f49/ghc:

parser: API Annotations : guardquals1 does not annotate commas properly

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`.

Reviewed By: austin

Differential Revision: https://phabricator.haskell.org/D818

GHC Trac Issues: #10256

comment:5 Changed 3 years ago by thoughtpolice

Resolution: fixed
Status: patchclosed

Merged to ghc-7.10.

Note: See TracTickets for help on using tickets.