Opened 3 years ago

Closed 3 years ago

#10312 closed bug (fixed)

ApiAnnotations: misplaced AnnComma for squals production

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

Description

The parser production for squals has

    : squals ',' transformqual
             {% addAnnotation (gl $ last $ unLoc $1) AnnComma (gl $2) >>
                ams (sLL $1 $> ()) (fst $ unLoc $3) >>
                return (sLL $1 $> [sLL $1 $> ((snd $ unLoc $3) (reverse (unLoc $1)))]) }

This attaches the comma to the wrong part of the squals, as it is generated in reverse order.

Change History (4)

comment:1 Changed 3 years ago by alanz

Status: newpatch

comment:2 Changed 3 years ago by alanz

Differential Rev(s): Phab:D846

comment:3 Changed 3 years ago by Alan Zimmerman <alan.zimm@…>

In 713612674634754edd17264e688f0479d943d8d2/ghc:

ApiAnnotations: misplaced AnnComma for squals production

Summary:
The parser production for squals has

    : squals ',' transformqual
             {% addAnnotation (gl $ last $ unLoc $1) AnnComma (gl $2) >>
                ams (sLL $1 $> ()) (fst $ unLoc $3) >>
                return (sLL $1 $> [sLL $1 $> ((snd $ unLoc $3) (reverse (unLoc $1)))]) }

This attaches the comma to the wrong part of the squals, as it is
generated in reverse order.

Test Plan: ./validate

Reviewers: hvr, austin

Reviewed By: austin

Subscribers: bgamari, thomie, mpickering

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

GHC Trac Issues: #10312

comment:4 Changed 3 years ago by thoughtpolice

Resolution: fixed
Status: patchclosed

Merged to ghc-7.10.

Note: See TracTickets for help on using tickets.