[Haskell-cafe] How to get a typed (type tagged) AST from GHC's core [Was: Dynamically typing TH.Exp at runtime]

Martin Hofmann martin.hofmann at uni-bamberg.de
Mon Mar 16 03:37:56 EDT 2009

Matthijs Kooijman wrote:
> I've been working on parsing core in the past few months. For an example, look
> here:
>   http://git.stderr.nl/gitweb?p=matthijs/projects/fhdl.git;a=blob;f=Translator.hs;h=8072f85925ad1238
> The loadModule and findBind functions are interesting. As for iterating the
> AST, have a look at Flatten.hs.

Thanks, Matthijs! This helps a lot and looks very promising! 

Only to avoid misunderstandings, you only use the ghc-api to get the AST
of a CoreModule which you translate into your own data structure (VHDL).
At this point, you don't use type information, right?


More information about the Haskell-Cafe mailing list