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 < [email protected]> 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 <[email protected]> *On Behalf Of *Zubin > Duggal > *Sent:* 14 May 2018 13:32 > *To:* [email protected] > *Cc:* Joachim Breitner <[email protected]>; Gershom B < > [email protected]> > *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 > [email protected] > http://mail.haskell.org/cgi-bin/mailman/listinfo/ghc-devs > >
_______________________________________________ ghc-devs mailing list [email protected] http://mail.haskell.org/cgi-bin/mailman/listinfo/ghc-devs
