module Data.Bits
Simon Marlow
simonmar@microsoft.com
Mon, 9 Sep 2002 10:01:07 +0100
> I have just been implementing the library module `Data.Bits'=20
> for nhc98,
> as part of an effort to bring that compiler up-to-date with=20
> the latest FFI spec.
>=20
> The FFI spec says that the operations called 'shift' and 'rotate',
> shift and rotate their argument to the right. However, the GHC
> implementation in CVS shifts and rotates to the left, and is=20
> documented to do so.
>=20
> Who is right? FWIW, before I read any documentation I expected the
> undecorated forms to be rightward.
I think it's probably a mistake in the FFI addendum. As far as I can
tell, the GHC/Hugs implementation of Bits has always worked the other
way around.
Cheers,
Simon