A typeclass for byte operations?

Brandon S. Allbery KF8NH allbery at ece.cmu.edu
Fri Feb 20 01:16:39 EST 2009


On 2009 Feb 19, at 13:12, Don Stewart wrote:
> 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.

I'd think these would be additions to the Word* types, reorganized  
under a Word class.

-- 
brandon s. allbery [solaris,freebsd,perl,pugs,haskell] allbery at kf8nh.com
system administrator [openafs,heimdal,too many hats] allbery at ece.cmu.edu
electrical and computer engineering, carnegie mellon university    KF8NH


-------------- next part --------------
A non-text attachment was scrubbed...
Name: PGP.sig
Type: application/pgp-signature
Size: 195 bytes
Desc: This is a digitally signed message part
Url : http://www.haskell.org/pipermail/libraries/attachments/20090220/6c1ef38b/PGP-0001.bin


More information about the Libraries mailing list