Num superclass of Bits (Was: Proposal: Remove Show and Eq superclasses of Num)

Edward Kmett ekmett at gmail.com
Sat Sep 17 03:10:27 CEST 2011


That and it prevents the obvious instance for Bool.

On Fri, Sep 16, 2011 at 8:51 PM, John Meacham <john at repetae.net> wrote:

> I also really dislike that superclass of bits, there is no need for it.
>
>    John
>
> On Fri, Sep 16, 2011 at 5:12 AM, Henning Thielemann
> <lemming at henning-thielemann.de> wrote:
> >
> > On Fri, 16 Sep 2011, Herbert Valerio Riedel wrote:
> >
> >> 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...
> >
> > Me too. For instance when working with flag sets like in [1], addition,
> > multiplication, absolute value, number literals make no sense.
> >
> > [1] http://hackage.haskell.org/package/enumset
> >
> > _______________________________________________
> > Libraries mailing list
> > Libraries at haskell.org
> > http://www.haskell.org/mailman/listinfo/libraries
> >
>
> _______________________________________________
> Libraries mailing list
> Libraries at haskell.org
> http://www.haskell.org/mailman/listinfo/libraries
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://www.haskell.org/pipermail/libraries/attachments/20110916/11b7f5c8/attachment.htm>


More information about the Libraries mailing list