RE: Splicing bindings
"Simon Peyton-Jones" <[email protected]> Mon, 11 Jul 2005 12:39:36 +0100
| Newsgroups | gmane.comp.lang.haskell.template |
|---|---|
| Message-ID | <036EAC76E7F5EC4996A3B3C3657D411602C93D5F@EUR-MSG-21.europe.corp.microsoft.com> |
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: [email protected] [mailto:[email protected]] On | Behalf Of Mike Gunter | Sent: 13 June 2005 06:24 | To: [email protected] | 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 | [email protected] | http://www.haskell.org/mailman/listinfo/template-haskell