[Template-haskell] using template haskell to implement pads for haskell?

Simon Peyton-Jones simonpj at microsoft.com
Mon Jun 30 04:18:18 EDT 2008


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 Haskell programs, or just one

Concerning (a), as Claus says if you want special purpose syntax (ie not Haskell) then you need quasiquotation. This is only in the HEAD, not a released GHC, but it works reliably as far as I know.
http://www.haskell.org/ghc/dist/current/docs/users_guide/template-haskell.html#th-quasiquotation

Concerning (b), if you want to write a program that generates one or more Haskell programs, then Template Haskell is good.  But if you can get away with just one program, then you may not need that extra complexity.  Many domain-specific languages embedded in Haskell use just Haskell (e.g. Parsec, Fran, 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 premature; I'm not sure.

Meanwhile perhaps other TH folk would like to join in?

Simon

| -----Original Message-----
| From: template-haskell-bounces at haskell.org [mailto:template-haskell-bounces at haskell.org] On Behalf Of
| David Walker
| Sent: 29 June 2008 20:26
| To: template-haskell at haskell.org
| Cc: princedpw at gmail.com >> David Walker; mblockel at dptinfo.ens-cachan.fr
| 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.)


More information about the template-haskell mailing list