Skip to content

Remove comments about API annotations

There are lots of comments scattered around the code which look like

         -- - 'ApiAnnotation.AnnKeywordId's : 'ApiAnnotation.AnnOpen',           
         --                                   'ApiAnnotation.AnnClose',          
         --                                   'ApiAnnotation.AnnComma',          
         --                                   'ApiAnnotation.AnnType'            
                                                                                 
         -- For details on above see note [Api annotations] in ApiAnnotation

these are meant to tell you which annotations are associated with each syntax element. They were added in an heroic effort by alanz but are very hard to keep up to date and verify the correctness of.

It would be much better if we had a programatic description of which annotations could be attached to which syntax elements and thankfully one already exists in ghc-exactprint. This library isn't in the source tree but I don't think this really matters, users can just depend on it if they want to use them.

I think we should remove all these comments to clean up the source a bit and point users to ghc-exactprint from the ApiAnnotations page.

Trac metadata
Trac field Value
Version 8.0.1
Type Task
TypeOfFailure OtherFailure
Priority normal
Resolution Unresolved
Component Compiler
Test case
Differential revisions
BlockedBy
Related
Blocking
CC alanz
Operating system
Architecture
To upload designs, you'll need to enable LFS and have an admin enable hashed storage. More information