In order to simplify and make Haskell more consistent
I suggest the following additions to the grammar
() should be treated as a conid (or con)
[] should be treated as a conid (or con)
and less urgent
(->) should be a con
This simplifies the grammar, and also allows writing the
definitions
> data [] a = [] | a : [a]
> data () = ()
to define these types. (Neat, huh?)
It also gives a name, "[]", to the list type. Previously
lists could only be used in type expressions, it didn't have
a name. In Haskell as it is this is not a big deal, but
with constructor classes you need it.
In the same vein I'd like "(,)", "(,,)", "(,,,)", etc. to be legal
both in types and expressions. This would remove the annoying
need to write the function
> pair x y = (x,y)
when you need the pairing function. (Why should the poor tupling
constructors not be able to be used as curried functions when
all others can?)
If you want more of the same, you could also allow "(exp,)" and
"(,exp)" for consistency.
Well, these were several suggstions. What do you think?
-- Lennart