HIE Files

Peter Podlovics peter.d.podlovics at gmail.com
Mon May 14 20:56:17 UTC 2018


Hi,

Sometimes, when working with a type-checked AST, it can be useful to know
the types of subexpressions as well. A simple use case would be any kind of
static analysis of the code. Currently, the type-checker discards all
intermediate results after the type checking ends, so the AST only has info
about nodes with names. Storing the types of subexpressions somewhere would
be a great benefit for many tools. Do you plan on including these
intermediate results in the HIE file?

Regards,
Peter

On Mon, May 14, 2018 at 3:30 PM, Simon Peyton Jones via ghc-devs <
ghc-devs at haskell.org> wrote:

> Interesting.
>
>
>
> Please do keep the wiki page up to date so that it accurately describes
> the current design.  For example, I hope you’ll flesh out what a “simplified,
> source aware, annotated AST derived from the Renamed/Typechecked Source” really
> is.
>
>
>
> Why not put the .hie-file info into the .hi file?  (Optionally, of
> course.)
>
>
>
> What tools/libraries do you plan to produce to allow clients to read a
> .hie file and make send of the contents?
>
>
>
> Simon
>
>
>
>
>
>
>
> *From:* ghc-devs <ghc-devs-bounces at haskell.org> *On Behalf Of *Zubin
> Duggal
> *Sent:* 14 May 2018 13:32
> *To:* ghc-devs at haskell.org
> *Cc:* Joachim Breitner <mail at joachim-breitner.de>; Gershom B <
> gershomb at gmail.com>
> *Subject:* HIE Files
>
>
>
> Hello,
>
> I will be working on a GSOC project that will allow GHC to output a new
> .hie file to be written next to .hi files. It will contain information
> about the typechecked Haskell AST, allowing tooling(like haddocks
> --hyperlinked-source and haskell-ide-engine) to work without having to
> parse, rename and typecheck files all over again.
>
> I have made a GHC wiki page containing more details here:
>
> https://ghc.haskell.org/trac/ghc/wiki/HIEFiles
>
>
>
> Looking forward to any comments and suggestions.
>
> Thanks,
>
> Zubin.
>
> _______________________________________________
> ghc-devs mailing list
> ghc-devs at haskell.org
> http://mail.haskell.org/cgi-bin/mailman/listinfo/ghc-devs
>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.haskell.org/pipermail/ghc-devs/attachments/20180514/8104abc5/attachment.html>


More information about the ghc-devs mailing list