Iavor Diatchki writes in response to Thomas JÃger
Literal patterns need equality: f 2 = e is like: f x | x == 2 = e
These do not force the 'Num' class to be a superclass of 'Ord' or 'Eq'. If 'Num' was not a superclass of 'Eq', whenver you used a literal pattern there would be an extra constraint that there should be equality on the corresponding type.
You mean of course that Eq is a superclass of Num, not the reverse.
Anyway, I always hated this, especially working with functional objects for which I had some arithmetic defined...
Jerzy Karczmarczuk
_______________________________________________ Haskell-Cafe mailing list [email protected] http://www.haskell.org/mailman/listinfo/haskell-cafe
