[Template-haskell] Type inference

Oleg Mürk oleg.myrk at gmail.com
Sun Apr 23 17:52:31 EDT 2006


Hello,

I have the following problem. I'd like to infer types of local bindings
using 'reify':
------------------------------------
testValue =
    let
        a = 10
    in
        $(do
            VarI _ t _ _ <- reify 'a
            lift (pprint t)
        )
-------------------------------------
But this code prints only:
-------------------------------------
*Debug> testValue
"t_0"
-------------------------------------
Is this intended behavior? Are there any workarounds?
Things work fine if symbol is defined in another module.
I do realise that in general $(...) may add additional constraints on local
variables.

OM
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://www.haskell.org//pipermail/template-haskell/attachments/20060423/99f59224/attachment-0001.htm


More information about the template-haskell mailing list