[Template-haskell] Template Haskell in 6.4

Simon Peyton-Jones simonpj at microsoft.com
Thu Dec 23 04:42:48 EST 2004


Dear Template Haskell folk

I think I've reached the end of my urgent to-do list for Template
Haskell in GHC 6.4.  Can any of you build the HEAD and try it out?  In
particular, I think most of the dust has settled on the new Name data
type.

The worst feature at the moment is that if the programmer constructs an
utterly bogus piece of TH syntax, and then splices it in, there's an
abysmal error message (emitted by hsSyn/Convert.lhs).  The point is that
TH.Syntax allows many syntactically ill-formed programs (e.g. putting a
forall type in a context) and that simply crashes the conversion from
TH.Syntax -> HsSyn

What is needed is for someone to take hsSyn/Convert in hand, and give it
proper error messages.  The conversion process is not unlike the renamer
-- it may fail for many programmer reasons, and then it should produce a
decent error message.

Any volunteers?  It's not difficult...

Simon


More information about the template-haskell mailing list