Hi all,

I'm having a problem similar to Ranjit in the mail "parsing types".

However, I want to get the type of an HsExpr:

getType :: HsExpr -> Type

or something similar.

This should basically do what :t does in ghci, but for any given
HsExpr (also it should not work on Strings).


Looking at the ghc sources, I found

exprType :: CoreExpr -> Type

which is pretty close to what i need.


Another way of solving this, would be a function lik this:

hsExpr2CoreExpr :: HsExpr -> CoreExpr

Than I could combine them like:

exprType . hsExpr2CoreExpr


Any hints are very much appreciated,

Sven

_______________________________________________
Glasgow-haskell-users mailing list
Glasgow-haskell-users@haskell.org
http://www.haskell.org/mailman/listinfo/glasgow-haskell-users

Reply via email to