[Haskell-beginners] Haskell Serialization

Ashish Agarwal agarwal1975 at gmail.com
Mon May 10 15:00:14 EDT 2010

> the Binary class as it is specialized to serializing values for Haskell

Can you please expand on this? I've been using Data.Binary to (de)serialize
messages for some networking protocols, and have made all my types instances
of Binary. Non-Haskell programs will be receiving and sending messages on
one end, but I didn't think that mattered since my get and put functions are
written to adhere to the protocol's definition. Is there some issue I'm

On Mon, May 10, 2010 at 6:18 AM, Stephen Tetley <stephen.tetley at gmail.com>wrote:

> Hi Tom
> If you are interfacing with non-Haskell binary objects - you will want
> binary parsing / writing rather than simple serialization as the
> format will be determined by the foreign objects.
> You can still use Data.Binary (indeed its probably the best choice),
> but you will want to use the modules Data.Binary.Get and
> Data.Binary.Put directly and probably avoid the Binary class as it is
> specialized to serializing values for Haskell only.
> There are probably quite a few libraries on Hackage that you can look
> at for examples, though there might be more packages that supply
> parsers only and don't do writing, e.g:
> http://hackage.haskell.org/package/pecoff  (Parser only)
> There will be more among the packages this list that directly depend on
> Binary:
> http://bifunctor.homelinux.net/~roel/cgi-bin/hackage-scripts/revdeps/binary-
> Best wishes
> Stephen
> _______________________________________________
> Beginners mailing list
> Beginners at haskell.org
> http://www.haskell.org/mailman/listinfo/beginners
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://www.haskell.org/pipermail/beginners/attachments/20100510/a2c53f1c/attachment.html

More information about the Beginners mailing list