
15 Sep
2011
15 Sep
'11
7:47 p.m.
Ian Lynagh writes:
I would like to propose that we remove the Show and Eq superclasses from Num, i.e. change class (Eq a, Show a) => Num a where [...] to class Num a where [...]
This will break client code, but will not fix other defects of Num, namely the inclusion of abs/signum, and tying (*) to (+). I think the right approach is to refactor the numeric classes along algebraic lines: http://hackage.haskell.org/package/yap Leave Num with its broken interface for backward compatibility (for clients), but provide a clean Ring superclass for new code.