[Template-haskell] Release

Simon Peyton-Jones simonpj@microsoft.com
Tue, 27 May 2003 12:32:28 +0100


| The Maybe module defines one datatype.  THSyntax defines
| many.  One problem is that constructors of some of these
| data types clash.  For examples both Exp and Pat have
| variables and literals.

Fair enough.  Let's use 'P' for Pat, and nothing for Exp.  Thus Var and
VarP or PVar.  I.e. leave Exp, the heaviest hitter of all, unannotated.
Would that serve?

Then the only oddities are 'Let' and 'Case' because the lower-case smart
constructors (only) clash with the Haskell keywords.  Is that a good
enough reason to add 'E' to every constructor (concrete and smart)?  My
nose says 'no' but yours may differ.  For these, I think Let/letE and
Case/caseE are not so bad.  An alternative would be to use Bind and
Switch instead.

this isn't a big deal in the end.  I'm quite willing to be over-ruled. =20


Simon