[Template-haskell] Splicing bindings
Simon Peyton-Jones
simonpj at microsoft.com
Mon Jul 11 07:39:36 EDT 2005
Sadly no. Ideally one would like to be able to splice in *any*
syntactic construct, but at present implementing each requires separate
work in the implementation, and it's especially tricky if the construct
can bind things (such as declarations, patterns, and do-statements).
Again, you can do it "by steam" using the lower-level constructors...
it's just more clumsy.
Simon
| -----Original Message-----
| From: template-haskell-bounces at haskell.org
[mailto:template-haskell-bounces at haskell.org] On
| Behalf Of Mike Gunter
| Sent: 13 June 2005 06:24
| To: template-haskell at haskell.org
| Subject: [Template-haskell] Splicing bindings
|
|
| Is there a way to splice in a
|
| nm <- m
|
| binding? I.e., I'd like something along the lines of
| mdo
| ...
| $(defNm nm m)
| ...
| ... nm ...
| ...
|
| which would expand to
|
| mdo
| ...
| nm <- name "nm" m
| ...
| ... nm ...
| ...
|
| . Is this possible?
|
| thanks,
| mike
| _______________________________________________
| template-haskell mailing list
| template-haskell at haskell.org
| http://www.haskell.org/mailman/listinfo/template-haskell
More information about the template-haskell
mailing list