RE: using template haskell to implement pads for haskell?
Simon Peyton-Jones <[email protected]> Mon, 30 Jun 2008 09:18:18 +0100
| Newsgroups | gmane.comp.lang.haskell.template |
|---|---|
| Message-ID | <638ABD0A29C8884A91BC5FB5C349B1C32AE72D1BB2@EA-EXMSG-C334.europe.corp.microsoft.com> |
Dave It's not clear to me a) whether or not you want new syntax (requires writing a parser) b) whether you want a single description to generate multiple different Has= kell programs, or just one Concerning (a), as Claus says if you want special purpose syntax (ie not Ha= skell) then you need quasiquotation. This is only in the HEAD, not a releas= ed GHC, but it works reliably as far as I know. http://www.haskell.org/ghc/dist/current/docs/users_guide/template-haskell.h= tml#th-quasiquotation Concerning (b), if you want to write a program that generates one or more H= askell programs, then Template Haskell is good. But if you can get away wi= th just one program, then you may not need that extra complexity. Many dom= ain-specific languages embedded in Haskell use just Haskell (e.g. Parsec, F= ran, Yampa...), not TH nor quasiquotation. You'd get a 30x wider audience on the Haskell Cafe mailing list, so yes, I'= d try there too. Even jumping to Template Haskell as a solution may be pre= mature; I'm not sure. Meanwhile perhaps other TH folk would like to join in? Simon | -----Original Message----- | From: [email protected] [mailto:template-haskell-bounc= [email protected]] On Behalf Of | David Walker | Sent: 29 June 2008 20:26 | To: [email protected] | Cc: [email protected] >> David Walker; [email protected] | Subject: [Template-haskell] using template haskell to implement pads for = haskell? | | hi, | | I am new to Haskell and even more so to Haskell templates -- if there | is an obvious answer to my question, please just point me at the | relevant URL. Thanks! (If you think I should email this query to | a broader Haskell mailing list let me know too.)