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.