Re: in-tree API Annotations

2020-05-26 Thread Alan & Kim Zimmerman
And to reply to my own question, yes we do, we use them to tie up the
ParsedSource RdrName to the renamed Name when considering refactorings.

On Mon, 25 May 2020 at 23:33, Alan & Kim Zimmerman 
wrote:

> 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


in-tree API Annotations

2020-05-25 Thread Alan & Kim Zimmerman
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