Quite right :). I agree whole-heartedly. There's nothing wrong with overloading (+) and (-) in this case, but the rest really don't make much sense. Probably best to leave them undefined and just not use them. Then you could define your own dot product function and the like.
-- Hal Daume III | [EMAIL PROTECTED] "Arrest this man, he talks in maths." | www.isi.edu/~hdaume > -----Original Message----- > From: [EMAIL PROTECTED] > [mailto:[EMAIL PROTECTED] On Behalf Of Jerzy Karczmarczuk > Sent: Wednesday, July 09, 2003 8:25 AM > To: [EMAIL PROTECTED] > Subject: Re: How overload operator in Haskell? While this is a possible solution, I would shout loudly: "Arrest this man, he is disrespectful wrt math!". Actually, this shows once more that the Num class and its relatives is a horror... Signum in this context has no sense. The multiplication might be the cross product, but its anti-commutativity shows plainly that this is not a 'standard' multiplication. 'fromInteger' has even less sense than signum... I am particularly horrified by "abs v = map abs v", and I am sure all of you see why. I think that a more sane solution would be the definition of a particular class with operations porting names like <+>, or ^+^, or whatever similar to standard ones, but different. Jerzy Karczmarczuk _______________________________________________ Haskell mailing list [EMAIL PROTECTED] http://www.haskell.org/mailman/listinfo/haskell _______________________________________________ Haskell mailing list [EMAIL PROTECTED] http://www.haskell.org/mailman/listinfo/haskell