Re: [Haskell-cafe] what is wrong w my IORef Word32 ?

2013-07-18 Thread Edward Z. Yang
shiftL has the wrong type: Bits a = a - Int - a so it is expecting the value in the IORef to be an Int. Edward Excerpts from Joerg Fritsch's message of Thu Jul 18 10:08:22 -0700 2013: All, what is wrong w the below code? I get an type error related to the operation shiftL import

Re: [Haskell-cafe] what is wrong w my IORef Word32 ?

2013-07-18 Thread Joerg Fritsch
Can I easily fix the modifyIORef statement by swapping something ? --Joerg On Jul 18, 2013, at 7:19 PM, Edward Z. Yang ezy...@mit.edu wrote: shiftL has the wrong type: Bits a = a - Int - a so it is expecting the value in the IORef to be an Int. Edward Excerpts from Joerg Fritsch's

Re: [Haskell-cafe] what is wrong w my IORef Word32 ?

2013-07-18 Thread Taylor Hedberg
Joerg Fritsch, Thu 2013-07-18 @ 19:22:46+0200: Can I easily fix the modifyIORef statement by swapping something ? --Joerg Replace `shiftL` with `flip shiftL` and change the type signature of `sLbitfield` to take an Int instead of an Integer. signature.asc Description: Digital signature