I am trying to get my head around the best way to put the API annotations
into the GHC ParsedSource directly, so ghc-exactprint can move in to GHC
and make the development/testing process easier.

Prior to API Annotations, there were very few locations in the AST, as they
were added as anchor points for the annotations, being separate from the
AST and indexed to it by the SrcSpan.

I am intending to strip out the superfluous ones, in particular all the
(Located RdrName), replacing them with something like

  data ApiAnnName a = N ApiAnn a

instead. So they would still be wrapped, but the annotations would be only
ones that can occur for a RdrName, such a backticks, parens, and so on.

Does anything actually need these locations now they are there?  I am
thinking specifically of the .hie files, as the `toHie` instances seem to
make use of locations extensively.

Regards
  Alan
_______________________________________________
ghc-devs mailing list
ghc-devs@haskell.org
http://mail.haskell.org/cgi-bin/mailman/listinfo/ghc-devs

Reply via email to