[Haskell-cafe] instance Binary Data

Joel Reymont joelr1 at gmail.com
Tue Jul 11 05:44:31 EDT 2006


I don't see how this can work for arbitrary types without auto- 
generating the serialization code. Once the code is generated you can  
just store the type dictionary at the beginning of the file and use  
it to deserialize.

I'm not sure this can be done on top of Binary since the type tag  
will determine the Binary instance to use.

On Jul 11, 2006, at 7:38 AM, Bulat Ziganshin wrote:

> Hello Haskell,
>
> one Streams library user asked me about support of serialization
> TOGETHER with type information which means implementation of
> "instance Binary Data" (any other variants?). can anyone describe me
> how i can implement this? Binary instance is very like Show/Read, just
> uses compact binary encoding of values

--
http://wagerlabs.com/







More information about the Haskell-Cafe mailing list