Hello all, In the GHC Commentary [1] I can read that the type checker adds type information to the syntax tree. So I would expect that there is a way to get a syntax tree of type HsModule Id. The GHC API provides functions checkModule and checkAndLoadModule which both return a CheckedModule that contains the parsedSource :: Located (HsModule RdrName) and typecheckedSource :: LHsBinds Id. But it doesn't include anything of type HsModule Id. I don't see how to unify the parsedSource and typecheckedSource to get the syntax tree parametrised by Id instead of RdrName (and containing the type information), and the API doesn't seem to provide such functionality (or did I miss something?).
Can anyone help? Or indicate where in the parsedSource the LHsBinds should be placed? Regards, Gerbo Engels [1] http://hackage.haskell.org/trac/ghc/wiki/Commentary/Compiler/HsSynType#DecoratingHsSynwithtypeinformation _______________________________________________ Haskell-Cafe mailing list Haskell-Cafe@haskell.org http://www.haskell.org/mailman/listinfo/haskell-cafe