Proposal: Remove Num superclass of Bits

Johan Tibell johan.tibell at gmail.com
Sat Oct 15 19:23:50 CEST 2011


On Sat, Oct 15, 2011 at 3:56 AM, Roman Leshchinskiy <rl at cse.unsw.edu.au>wrote:

> On 15/10/2011, at 11:11, Ian Lynagh wrote:
>
> > On Sat, Oct 15, 2011 at 11:56:27AM +0200, Bas van Dijk wrote:
> >> On 15 October 2011 00:01, Ian Lynagh <igloo at earth.li> wrote:
> >>> Removing the Num superclass of Bits was also mentioned, but that would
> >>> need its own proposal.
> >>
> >> Ok, I would like to propose removing the Num superclass of Bits.
> >
> > Would we just remove default methods like
> >    bit i = 1 `shiftL` i
> >    x `testBit` i = (x .&. bit i) /= 0
> > ?
>
> The Num superclass is only needed to be able to say 0 and 1. Perhaps we
> should just add the methods zero and one to Bits?
>

That sounds reasonable.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://www.haskell.org/pipermail/libraries/attachments/20111015/c1753163/attachment.htm>


More information about the Libraries mailing list