
22 Dec
2010
22 Dec
'10
6:24 p.m.
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?