Re: Splices returning splices

2015-03-23 Thread J. Garrett Morris
On Mon, Mar 23, 2015 at 3:43 PM, Simon Peyton Jones wrote: > A quasiquoter is really a splice. That is [foo| blah |] is the same as > $(foo "blah"). So it might be easier to discuss your question in the > context of ordinary splices and quotes. You want foo to return code > with a splice, thus:

RE: Splices returning splices

2015-03-23 Thread Simon Peyton Jones
Currently it just isn't supported. Suppose you say f x = [| $(g y) |] ...$(f 3) Does $(f 3) mean "run (f 3) returning some code with embedded splices, and then run those", or does it mean (as now) "call (f 3), and to do so run (g y) first, to generate some code that is spliced int

Splices returning splices

2015-03-23 Thread J. Garrett Morris
Hello, I'm attempting to write a quasiquoter with relatively full antiquotation support. In doing so, I've arrived at I think an odd problem: the expression grammar in Language.Haskell.TH.Syntax doesn't seem to include splices. This seems to mean that my antiquotations can't themselves include s