Type Classes and the StdEnv

Nick Kallen phantom@earthlink.net
Wed, 26 Nov 1997 23:46:43 -0800


>This is because there were no type constructor classes at the time
>the StdEnv was written. To retain backward compatibility the function
>has not been changed since.

Perhaps you should throw backward compatibility out the door when you
release the Object IO 1.0 Library and make the best StdEnv possible. Despite
the importance of backward compatibility, I don't see why it's such a sacred
cow, especially considering the limited user base of Clean.

>Subtle typing problems can occur if you
>simply overload map. The following program demonstrates such a
>problem. Changing "map" into the overloaded "map`" in "incAll" will
>result in a compile-time error:

I see the error:

Type error [a.icl,7,Start]: "Start"  cannot be overloaded:  (a Int) | Map ,
Nil a

But I haven't the slightest clue why this arises. What is going wrong?
Perhaps Clean's type system is too limiting if such is not allowed?