Currently: Your only option is to use GHC API if you want type checking. I
can't help you with that, sorry.

Envisioned: The function you ask for can definitely be written for
haskell-src-exts, which I know you are currently using. I just need to
complete my type checker for haskell-src-exts first. Which is not a small
task, but one that has been started. I doubt it will be done in time for
your project though, sorry.

Best regards,

/Niklas

On Tue, Dec 13, 2011 at 6:16 PM, Sh NJP <[email protected]> wrote:

> Hi,
>
> I do some pre-processing on a normal Haskell code ( -F ). The
> pre-processor needs to know the type of each expression.
> What are the possibilities to do so?
> Can I use GHC API to employ GHC type checker? If yes, any good tutorial?
> Is it too naive to think of a function, f :: String -> AnnotatedAST , that
> takes Haskell code and returns its corresponding abstract syntax tree
> annotated with types?
>
> Thanks,
>  /shayan
>
> _______________________________________________
> Haskell-Cafe mailing list
> [email protected]
> http://www.haskell.org/mailman/listinfo/haskell-cafe
>
>
_______________________________________________
Haskell-Cafe mailing list
[email protected]
http://www.haskell.org/mailman/listinfo/haskell-cafe

Reply via email to