<div dir="ltr">Hi list,<div><br></div><div>I am 99.9% sure that this is currently not possible, but I might as well ask:</div><div><ul><li>Is there a way to lift type variables into Template Haskell type splices?</li></ul></div><div>What I had in mind would be something like this (erroneous) code:</div><div><br></div><div><div>liftT :: a -> Q Type</div><div>liftT (_::a) = [t| $a |]</div></div><div><br></div><div>I have no idea how hard it would be to implement such a feature, or if it is remotely doable.</div><div>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.</div><div><br></div><div>Cheers,</div><div>hugo</div><div><br>-- <br><a href="http://www.cs.cornell.edu/~hpacheco" target="_blank">www.cs.cornell.edu/~hpacheco</a><br></div></div>