
16 May
2013
16 May
'13
4:24 a.m.
On Thu, 16 May 2013, Vincent Hanquez wrote:
I'm trying to expose some byte swapping (bSwap) capabilities in base, namely operation to allow to swap endianness on word{16,32,64}, i.e.:
bswap16 :: Word16 -> Word16 bswap16 a = (a `shiftR` 8) .|. (a `shiftL` 8) ...
If at all, I'd suggest a name without the 'b', since the other functions like 'shift' do not contain a 'b' as well. You can use qualification if you want to say that the swap is meant with respect to 'bits'.