On Wed, 22 Dec 2010, Eugene Kirpichov wrote:

Hi cafe,

I've released "storable-endian"
http://hackage.haskell.org/package/storable-endian

It defines types like {{Int,Word}{16,32,64},Double,Float}{LE,BE} (for
example Int32BE) etc. with a corresponding Storable instance.

It is needed for binary interoperability with libraries or network
protocols with fixed endianness. Hope you find it useful.

How about type constructors LittleEndian and BigEndian?

newtype LittleEndian a = LittleEndian a

Maybe using some type classes you can even get rid of Template Haskell and get plain Haskell 98?

_______________________________________________
Haskell-Cafe mailing list
Haskell-Cafe@haskell.org
http://www.haskell.org/mailman/listinfo/haskell-cafe

Reply via email to