Question about Haskell AST
j2ren at ucsd.edu
Mon Jan 10 18:21:02 CET 2011
I need to be able to take a piece of Haskell source code and get an simplified, typed, intermediate representation of the AST, which means I need to use compiler/coreSyn/CoreSyn.lhs
So I'm first trying to get the desguaredModule of the source code with
modSum <- getModSummary $ mkModuleName "..."
p <- parseModule modSum
t <- typecheckModule p
d <- desugarModule t
Now I'm really stuck on figuring out how to connect the variable d of type desugaredModule to compiler/coreSyn/CoreSyn.lhs to get Expr patterns like App, Let, Case, etc.
Also, is it correct to get the deguaredModule first? At least CoreSyn.lhs seems to suggest this.
Any suggestions would be greatly apprecia
More information about the Glasgow-haskell-users