• Alan Zimmerman's avatar
    ApiAnnotations : pquals production adds AnnVbar in the wrong place · fe38195e
    Alan Zimmerman authored
    Summary:
    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.
    
    Test Plan: ./validate
    
    Reviewers: hvr, austin
    
    Reviewed By: austin
    
    Subscribers: thomie, mpickering
    
    Differential Revision: https://phabricator.haskell.org/D869
    
    GHC Trac Issues: #10357
    fe38195e
Parser.y 163 KB