Proposal: Remove Show and Eq superclasses of Num

Herbert Valerio Riedel hvr at
Fri Sep 16 14:07:09 CEST 2011

On Fri, 2011-09-16 at 02:41 +0100, Ian Lynagh wrote:
> > > 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,
> It doesn't solve everything, but I hope we can agree it is an
> incremental step in the right direction. I don't think a revolutionary
> change fixing all the issues is feasible. This particular blemish was
> already being described as "largely historical" more than a decade ago:


Just as a side note: I also dislike that the Data.Bits.Bits type-class
has Num as its superclass; If I need something to be an instance of the
Bits class for the bit-ops, I don't usually want to be forced to provide
multiplication and addition operations as well... 

More information about the Libraries mailing list