There's a separate Template Haskell mailing list, which it'd be worth ccing on this (are you on it)? Ian Lynagh has a home page for Template Haskell, at http://www.haskell.org/th/ [IAN: it'd be worth noting the current unimplemented features of TH on the home page, perhaps. And is the TH page linked from Haskell.org? Couldn't find the link, if it exists.] | trying to adapt the zipN-example in the paper | "Template Meta-programming for Haskell" by | Sheard and Peyton Jones to Language.Haskell.THSyntax | I found that quasi-quotation for patterns does not seem | to work with ghci-6.0, e.g., the following results in | "Parse error in pattern": | | pcons x xs = [p| $x : $xs |] Yes -- pattern splices are not implemented at all. The user manual should say this, but doesn't. There are good reasons for this, as you'll see by looking at the TH mailing list archive. | Trying to use the standard list representation by | | pcons x xs = Pcon "(:)" [x,xs] | | I got the error message | | Data constructor not in scope: `(:)' | tcLookupDataCon: `(:)' is not in scope You need to say "GHC.Base::" to name precisely the (:) defined by GHC. This is clearly Bad and Horrible, and is on the list for a radical clean up. Tim Sheard is working on a design document describing what we have in mind. Tim? Simon
On Thu, Jul 03, 2003 at 11:23:35AM +0100, Simon Peyton-Jones wrote:
[IAN: it'd be worth noting the current unimplemented features of TH on the home page, perhaps.
Good idea, will do.
And is the TH page linked from Haskell.org? Couldn't find the link, if it exists.]
Whoops, slipped my mind, thanks. I've added a link from http://www.haskell.org/development/ ("The Future of Haskell") as that is where it seemed to fit best. Thanks Ian
participants (2)
-
Ian Lynagh -
Simon Peyton-Jones