[Haskell-cafe] ANNOUNCE: storable-endian

Henning Thielemann lemming at henning-thielemann.de
Thu Dec 23 00:24:50 CET 2010

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?

More information about the Haskell-Cafe mailing list