&gt; the Binary class as it is specialized to serializing values for Haskell only<div><br></div><div>Can you please expand on this? I&#39;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&#39;t think that mattered since my get and put functions are written to adhere to the protocol&#39;s definition. Is there some issue I&#39;m missing?</div>

<div><br><br><div class="gmail_quote">On Mon, May 10, 2010 at 6:18 AM, Stephen Tetley <span dir="ltr">&lt;<a href="mailto:stephen.tetley@gmail.com">stephen.tetley@gmail.com</a>&gt;</span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex;">

Hi Tom<br>
<br>
If you are interfacing with non-Haskell binary objects - you will want<br>
binary parsing / writing rather than simple serialization as the<br>
format will be determined by the foreign objects.<br>
<br>
You can still use Data.Binary (indeed its probably the best choice),<br>
but you will want to use the modules Data.Binary.Get and<br>
Data.Binary.Put directly and probably avoid the Binary class as it is<br>
specialized to serializing values for Haskell only.<br>
<br>
There are probably quite a few libraries on Hackage that you can look<br>
at for examples, though there might be more packages that supply<br>
parsers only and don&#39;t do writing, e.g:<br>
<br>
<a href="http://hackage.haskell.org/package/pecoff" target="_blank">http://hackage.haskell.org/package/pecoff</a>  (Parser only)<br>
<br>
There will be more among the packages this list that directly depend on Binary:<br>
<a href="http://bifunctor.homelinux.net/~roel/cgi-bin/hackage-scripts/revdeps/binary-0.5.0.2#direct" target="_blank">http://bifunctor.homelinux.net/~roel/cgi-bin/hackage-scripts/revdeps/binary-0.5.0.2#direct</a><br>
<br>
<br>
Best wishes<br>
<br>
Stephen<br>
_______________________________________________<br>
Beginners mailing list<br>
<a href="mailto:Beginners@haskell.org">Beginners@haskell.org</a><br>
<a href="http://www.haskell.org/mailman/listinfo/beginners" target="_blank">http://www.haskell.org/mailman/listinfo/beginners</a><br>
</blockquote></div><br></div>