Note [Api annotations]

Matthew Pickering matthewtpickering at
Wed Jul 20 10:36:01 UTC 2016

These comments are meant to indicate which annotations each AST
fragment has. However, they are rarely kept up to date and ultimately
not that useful. If someone wants to
know then it is easier to look at the `Annotate` module in
`ghc-exactprint`where this information also exists programatically.

On Wed, Jul 20, 2016 at 9:24 AM, Ömer Sinan Ağacan <omeragacan at> wrote:
> I see some weird comments like
>         --  - 'ApiAnnotation.AnnKeywordId' : 'ApiAnnotation.AnnOpen',
>         --      'ApiAnnotation.AnnVbar','ApiAnnotation.AnnComma',
>         --      'ApiAnnotation.AnnClose'
>         -- For details on above see note [Api annotations] in ApiAnnotation
> in some files, but Note [Api annotations] in compiler/parser/ApiAnnotation.hs
> doesn't say anything about those comments. Can someone update the note to
> explain what are those comments for?
> _______________________________________________
> ghc-devs mailing list
> ghc-devs at

More information about the ghc-devs mailing list