[GHC] #10256: parser: API Annotations : guardquals1 does not annotate commas properly (was: parser: API Annotations : squals does not annotate commas properly)

GHC ghc-devs at haskell.org
Tue Apr 7 19:51:40 UTC 2015


#10256: parser: API Annotations : guardquals1 does not annotate commas properly
-------------------------------------+-------------------------------------
        Reporter:  alanz             |                   Owner:  alanz
            Type:  bug               |                  Status:  new
        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:
-------------------------------------+-------------------------------------
Description changed by alanz:

Old description:

> The `squals` production includes
>
> {{{
>     | squals ',' qual
>              {% addAnnotation (gl $ head $ unLoc $1) AnnComma (gl $2) >>
>                 return (sLL $1 $> ($3 : unLoc $1)) }
> }}}
>
> The `AnnComma` should be attached to `(gl $ last $ unLoc $1)`, rather
> than the head.

New description:

 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.

--

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


More information about the ghc-tickets mailing list