[Haskell-cafe] lift in TemplateHaskell?
lists at qseep.net
Tue Apr 14 17:51:15 EDT 2009
I'm having trouble reading the TemplateHaskell docs and trying to do
something that seems like it should be simple. In MetaML, there is a 'lift'
function which does exactly what I want to do. Here's an example function:
let double n = [| 2 * $( litE (integerL n) ) |]
This works as intended, but instead of writing "litE (integerL n)" I just
want to write "lift n", 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?
-------------- next part --------------
An HTML attachment was scrubbed...
More information about the Haskell-Cafe