I agree with Lennart Augustsson that there is no reason why (->), [] and 
(,) should receive special treatment. With type constructor classes
they need to be treated as type constructors like any other.

As a matter of fact, I think that the desire in Haskell to have notation
for types reflect traditional notation for values (e.g [a] for (List a),
a->b for Hom(a,b), (a,b) for a*b etc), can be too much of a good thing.

An awful lot of traditional mathematical notation is arbitrary and
unreasonable, and there has to come a point when the effort to incorporate
every whim of tradition is no longer worth it. I would not want to
suggest that Haskell should regress to the position of older languages
where the use of standard symbols is fixed, but I think it is worth
pointing out that I cannot see anyone ever wanting to use a qualified
addition, such as

        (+) :: (Num a, Num b, Num c) => a -> b -> c

whereas one often wants to use multiplications of various types a->b->c,
e.g. row_vector -> column_vector -> scalar.
There are deep reasons for this difference that go beyond notational 
quirks. 

I do not see much use for classes with more than 2 parameters.

I would like to see Gofer's type-constructor classes generalized
slightly, so as to be able to have qualified kinds. For example,
if you want to have a datatype constructor Group for forming the
free group (Group a) on a type a, then a will have to belong to Eq
in order to be able to handle cancellation of terms. So Group
does not have kind *->*, but (Eq *)=>*->*. As things stand, you
cannot make Group belong to Monad.

-- Gavin Wraith

Reply via email to