[Template-haskell] Release

Simon Peyton-Jones simonpj@microsoft.com
Fri, 23 May 2003 09:01:00 +0100


| > > * Use a naming scheme for the functions that avoids having
| > >   to suffix some with "E" or "D" and some not.  Example: we
| > >   have "cond", but "letE".  Better *uniformly* use a single
| > >   suffix for all functions of the same class; eg, "condExp"
| > >   and "letExp" (or "condE" and "letE" if you desperately
| > >   want to save letters).

I'm sorry that I didn't respond to this at the time.  I agree with the
first sentence, but I had not absorbed the full glory of making every
single constructor three or four characters longer. Like Tim, I don't
think this is a good plan.  We don't say JustMaybe and NothingMabye.
Instead, we just choose constructor names that don't clash within a
particular module.  (Between unrelated modules, we can rely on qualified
names etc.)

My suggestion for resolving the occasional clash (and there were only a
handful) would be to change the constructor name.  For example, we have
a let form in Exp and in Stmt.  Let's just give one a different name.
The Stmt type is much less used than the Exp type. Perhaps 'Bind',
'Let', 'NoBind' and 'Par' are a bit cryptic because Stmts are so much
less common, so perhaps 'LetStmt' or 'StmtLet' would indeed be a good
choice.  Similarly for Foreign, the constructor 'ImportForeign' or
'ForImport' seems good; plain 'Import' is rather cryptic.   =20

	But for the big hitters, Exp, RHS, Dec, Pat, Typ, my personal=20
	preference would be for short constructor names. =20

Manuel, it sounds as though you disagree with this?

I would like to see the type 'Typ' change to 'Type', though!

Changing DotDot to Range is fine with me.


A process question, though: TH is for everyone, and Ian L is doing us
all a service by doing work on the design and implementation.  So he
gets a big vote.  Please do not take this as having a "don't fiddle"
subtext.  I for one am really grateful for your help.

Simon