[Haskell-cafe] Quoting with template haskell
Taylor Hedberg
t at tmh.cc
Wed Jul 17 16:03:42 CEST 2013
Jose A. Lopes, Wed 2013-07-17 @ 13:36:01+0200:
> I am quite new to template haskell and I am still trying to get the
> hang of it. How can I achieve something like the following Common Lisp
> code ?
>
> `(,fn ,arg1 ,arg2)
>
> Or is there a more Haskelley way of doing this ?
The naive translation would be:
[|$fn $arg1 $arg2|]
or, more explicitly:
appsE [fn, arg1, arg2]
`appsE` is from `Language.Haskell.TH`.
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 836 bytes
Desc: Digital signature
URL: <http://www.haskell.org/pipermail/haskell-cafe/attachments/20130717/78fbe93b/attachment.pgp>
More information about the Haskell-Cafe
mailing list