module Data.Bits

Malcolm Wallace Malcolm.Wallace@cs.york.ac.uk
Mon, 9 Sep 2002 16:04:08 +0100


Malcolm Wallace <Malcolm.Wallace@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.