[Haskell-cafe] Re: Numeric type classes

Jacques Carette carette at mcmaster.ca
Thu Sep 14 17:05:26 EDT 2006

jerzy.karczmarczuk at info.unicaen.fr wrote:
>> That is what polymorphism is all about! 
> Not in this context, sorry. This is a convention. Another one may give 
> you
> an abomination, e.g., 1+sin means 1 plus the addres of the sin routine.
> (Of course not in a 'decent' language, but I know a few undecent.

No, it is much more than convention.  In this case, it can be made 
completely formal.  The paper I referred to offers one way to do this.  
I sketched another.

Yes, it is possible to have 1+sin become meaningless in 'indecent' 
languages.  But as the mathematics (and Maple and ...) convention shows, 
there is one reasonable way to make this make sense which turns out to 
be quite useful.  In other words, the convention can be turned into a rule.

ML and Haskell have (thankfully) learned a lot from Lisp and Scheme, and 
then proceeded to 'tame' these with static typing.  And this is 
continuing - witness the flurry of type-theoretical research on 
continuations in the last 15 years (and very recent papers on typed 
delimited continuations).  More recently, GADTs have added to the set of 
'safe' programs that can by typed (which Lisp programmers writing 
interpreters knew all along).  I am saying that the case of 'adding 
arrows to the left' is another safe practice.  I backed myself up with a 
published reference [ie I took your comment regarding some of my 
previous haskell-cafe postings seriously!].


More information about the Haskell-Cafe mailing list