OK, I figured it out.<br><br>The class is Language.Haskell.TH.Syntax.Lift. The function is Language.Haskell.TH.Syntax.lift. And I can rewrite my function as:<br><br>let double n = [| 2 * n |]<br><br>I wish this were explained in the TemplateHaskell documentation.<br>
<br>- Lyle<br><br><div class="gmail_quote">On Tue, Apr 14, 2009 at 2:51 PM, Lyle Kopnicky <span dir="ltr">&lt;<a href="mailto:lists@qseep.net">lists@qseep.net</a>&gt;</span> wrote:<br><blockquote class="gmail_quote" style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;">
Hi folks,<br><br>I&#39;m having trouble reading the TemplateHaskell docs and trying to do something that seems like it should be simple. In MetaML, there is a &#39;lift&#39; function which does exactly what I want to do. Here&#39;s an example function:<br>

<br>let double n = [| 2 * $( litE (integerL n) ) |]<br><br>This works as intended, but instead of writing &quot;litE (integerL n)&quot; I just want to write &quot;lift n&quot;, or something similar. I expect that would involve a type class called something like Liftable that would lift literals using the appropriate functions. Does this exist?<br>

<br>Thanks,<br><font color="#888888">Lyle<br>
</font></blockquote></div><br>