Proposal: Remove Show and Eq superclasses of Num
Paterson, Ross
R.Paterson at city.ac.uk
Fri Sep 16 01:47:18 CEST 2011
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.
More information about the Libraries
mailing list