[Haskell-cafe] ANNOUNCE: binary-generic-0.2, generic binary serialisation using binary and syb.

Lars Petersen info at lars-petersen.net
Fri Aug 20 17:38:31 EDT 2010

Hello cafe,

although there was no announcement for version 0.1 there is one for 
the current 0.2:

binary-generic allows to perform binary serialisation without 
explicitly defining every type specific case.
If an algebraic type instantiates the 'Data' class the library is able 
to serialize it in a canonical way.

Unfortunately version 0.2 is not binary compatible with 0.1. I decided 
to break this for the sake of simplicity: In 0.2 all multibyte values 
are encoded big-endian. For further version I'll try to supply 
compatibility functions even if something changes, but since 0.1 is not 
even a week old, I think it's not necessary this time.

Okay, features: Common primitive types are supported out of the box:

* Char, Word, Int are serialised as big-endian, taken from Data.Binary
* Float and Double are serialised big-endian according to 
* Integer is serialized as in Data.Binary, but consistently big-endian
* Data.ByteString as it is
* Data.Text as Utf8

For types that are not supported yet, there is described an easy way 
of extension in 'Data.Binary.Extensions'. You are also free to ovveride 
certain choices and supply your own.

If you think there are more types that should be supported without 
explicit extension, drop me a line.


More information about the Haskell-Cafe mailing list