module Data.Bits

Malcolm Wallace Malcolm.Wallace at cs.york.ac.uk
Mon Sep 9 11:04:08 EDT 2002


Malcolm Wallace <Malcolm.Wallace at cs.york.ac.uk> writes:

>     x `shift`   i  | i<0  = x `shiftL` i
>                    | i==0 = x
>                    | i>0  = x `shiftR` i

Oops, of course that should be

>     x `shift`   i  | i<0  = x `shiftL` (-i)
>                    | i==0 = x
>                    | i>0  = x `shiftR` i

etc.




More information about the FFI mailing list