Simon Marlow [EMAIL PROTECTED] 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
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
Manuel M T Chakravarty [EMAIL PROTECTED] writes:
So, I would propose to
change the FFI spec. The main reason being that there is
already plenty of code which relies on the current
definition in GHC's Bits and there is no good reason to
break that code. Objections?
That's fine with me.
Errm, but in C there is no unified shift operator. You have for
left shift and and for right shift, and a negative shift is
undefined.
[blush]
This makes the specification come out nice and clean - you're
multiplying the number by 2^n instead of 2^{-n}.
Errm, but then right shift