Re: module Data.Bits

2002-09-11 Thread Manuel M T Chakravarty
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

RE: module Data.Bits

2002-09-10 Thread Simon Marlow
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

Re: module Data.Bits

2002-09-10 Thread Malcolm Wallace
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.

Re: module Data.Bits

2002-09-10 Thread Alastair Reid
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