[GHC] #10357: ApiAnnotations : pquals production adds AnnVbar in the wrong place

GHC ghc-devs at haskell.org
Mon May 11 13:27:59 UTC 2015


#10357: ApiAnnotations : pquals production adds AnnVbar in the wrong place
-------------------------------------+-------------------------------------
        Reporter:  alanz             |                   Owner:  alanz
            Type:  bug               |                  Status:  patch
        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:  Phab:D869
-------------------------------------+-------------------------------------

Comment (by Alan Zimmerman <alan.zimm@…>):

 In [changeset:"fe38195eb783fc2f2f2d5ef50fb665b06fd15e82/ghc"]:
 {{{
 #!CommitTicketReference repository="ghc"
 revision="fe38195eb783fc2f2f2d5ef50fb665b06fd15e82"
 ApiAnnotations : pquals production adds AnnVbar in the wrong place

 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
 }}}

--
Ticket URL: <http://ghc.haskell.org/trac/ghc/ticket/10357#comment:3>
GHC <http://www.haskell.org/ghc/>
The Glasgow Haskell Compiler


More information about the ghc-tickets mailing list