You might want to make it more general than byte and byte-vector (or whatever it is you imagine rotating). The endian problem occurs anytime a sequence of smaller units are aggregated to a larger unit. So it could be bits in a word, 8-bit bytes in a vector, nybbles in a byte, etc. On Thu, Feb 19, 2009 at 7:12 PM, Don Stewart <dons@galois.com> wrote:
Hey guys,
At work we have many and varied needs to do bytewise operations on Haskell data. Things like:
toBigEndian rotateBytes
etc.
Has anyone thought about:
* A "Bytes" class, like the Bits class? Providing standard operations on values treated as bytes?
* An Endian class, a la fromIntegral, for flipping bytes into a particular endianness.
-- Don _______________________________________________ Libraries mailing list Libraries@haskell.org http://www.haskell.org/mailman/listinfo/libraries