[Template-haskell] functions and quasi-quote

Creighton Hogg wchogg at gmail.com
Tue May 16 11:32:09 EDT 2006


On 5/16/06, Bulat Ziganshin <bulat.ziganshin at gmail.com> wrote:
>
> Hello Creighton,
>
> Monday, May 15, 2006, 7:30:48 PM, you wrote:
>
> > I can do something such as [|(+)|] just fine, but what I *want* is
> > to do something like (\x -> [|x|]) (+) for example.
> (\x ->> [|x|]) can be applied to numbers just fine, but not functions
> because it doesn't have an instance for Lift
> > I'm just confused by this.
>
> WHAT you want to do at last?


Maybe I should just rephrase my question.
I thought that [| |] was shorthand for putting something in the Quasi Monad,
just like how [ ] is shorthand for putting something in the List Monad.
Now then since I can write something silly like (\x -> [x]) to put a thing
into a list, I thought that I could do (\x -> [|x|]) to put objects into
Quasi.
This *doesn't* work, at least not the way I'd expect, and I was wondering
why.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://www.haskell.org//pipermail/template-haskell/attachments/20060516/20ede042/attachment.htm


More information about the template-haskell mailing list