[Haskell-cafe] Splicing type signature in TH
hpacheco at gmail.com
Thu Oct 16 04:06:42 UTC 2014
I am 99.9% sure that this is currently not possible, but I might as well
- Is there a way to lift type variables into Template Haskell type
What I had in mind would be something like this (erroneous) code:
liftT :: a -> Q Type
liftT (_::a) = [t| $a |]
I have no idea how hard it would be to implement such a feature, or if it
is remotely doable.
Naively, it seems to me that TH would have to delay evaluating the splice
until the type variable is fully expanded, but all the necessary
information would still be available at some point during compilation.
-------------- next part --------------
An HTML attachment was scrubbed...
More information about the Haskell-Cafe