<div dir="ltr">You can create a new forall'd type variable.  Would that work?<br></div><div class="gmail_extra"><br><div class="gmail_quote">On Thu, Oct 16, 2014 at 12:06 PM, Hugo Pacheco <span dir="ltr"><<a href="mailto:hpacheco@gmail.com" target="_blank">hpacheco@gmail.com</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><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><span class="HOEnZb"><font color="#888888"><div><br>-- <br><a href="http://www.cs.cornell.edu/~hpacheco" target="_blank">www.cs.cornell.edu/~hpacheco</a><br></div></font></span></div>
<br>_______________________________________________<br>
Haskell-Cafe mailing list<br>
<a href="mailto:Haskell-Cafe@haskell.org">Haskell-Cafe@haskell.org</a><br>
<a href="http://www.haskell.org/mailman/listinfo/haskell-cafe" target="_blank">http://www.haskell.org/mailman/listinfo/haskell-cafe</a><br>
<br></blockquote></div><br></div>