module Data.Bits

Manuel M T Chakravarty chak@cse.unsw.edu.au
Wed, 11 Sep 2002 17:25:02 +1000 (EST)


"Simon Marlow" <simonmar@microsoft.com> wrote,

> > The FFI Addendum actually doesn't commit to which operations
> > are in the class.  It just says defines all these ops to
> > have a context `Bits a', which is definitely the case.  In
> > other words, you proposed implementation is valid by the
> > spec and your argument for it makes sense to me.
> 
> The spec really ought to say what the member functions of the class are,
> if we expect people to be able to define their own instances of Bits,
> and I don't see why we shouldn't allow that.

True.

> I think Malcolm's proposed change looks reasonable, although there was
> probably a reason why these functions weren't made class members in the
> first place.  Alastair: it was your design originally I believe, any
> thoughts?  I think it would be a small optimisation in GHC too, at least
> for shifts by non-constant amounts.

I applied Malcolm's change now.

Manuel