Opened 3 years ago

Closed 3 years ago

#10207 closed bug (fixed)

parser: ParStmt has incorrect SrcSpan

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: Other Test Case:
Blocked By: Blocking:
Related Tickets: Differential Rev(s): Phab:D803
Wiki Page:

Description

The production for pquals is

pquals :: { Located [[LStmt RdrName (LHsExpr RdrName)]] }
    : squals '|' pquals
                     {% addAnnotation (gl $ last $ unLoc $1) AnnVbar (gl $2) >>
                        return (L (getLoc $2) (reverse (unLoc $1) : unLoc $3)) }
    | squals         { L (getLoc $1) [reverse (unLoc $1)] }

This assigns the location of the '|' to the entire returned value.

Change History (7)

comment:1 Changed 3 years ago by mpickering

Cc: mpickering added

comment:2 Changed 3 years ago by alanz

Milestone: 7.10.2

comment:3 Changed 3 years ago by alanz

Differential Rev(s): D803

comment:4 Changed 3 years ago by alanz

Review required on Phabricator, at https://phabricator.haskell.org/D803

comment:5 Changed 3 years ago by alanz

Differential Rev(s): D803Phab:D803
Status: newpatch

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

In f1a4e42ea2e5302147dcb69b9baa6f4aa3af6e37/ghc:

The production for `pquals` is incorrect; the specifics are in D803.

Reviewed By: austin

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

GHC Trac Issues: #10207

comment:7 Changed 3 years ago by thoughtpolice

Resolution: fixed
Status: patchclosed

Merged to ghc-7.10 and master.

Note: See TracTickets for help on using tickets.