On 11/10/06, [EMAIL PROTECTED] <[EMAIL PROTECTED]> wrote:
Why doesn't reify return function body?
reify (mkName "somefunction") for a function defined in the same module
returns constructor VarI (of data type Info) that does not contain
function declaration in (Maybe Dec) part.
What actions should I perform to get a function body with patterns,
expressions and all that?
I'm not sure, but when faced a similar problem I used the Haskell98
parser to get at the AST of the functions. In my case the functions
were defined in a different module so TH definitely couldn't get at
the internals. The details of what I did are here:
http://blog.codersbase.com/2006/09/01/simple-unit-testing-in-haskell/
HTH,
Jason
_______________________________________________
Haskell-Cafe mailing list
Haskell-Cafe@haskell.org
http://www.haskell.org/mailman/listinfo/haskell-cafe