On Sat, May 2, 2009 at 11:12, Jason Dusek <jason.du...@gmail.com> wrote:
>  I believe Data.Binary includes a header with the data
>  it serializes. In consequence, the second and all following
>  arrays will be invisible.
[Apologies for Jason for sending this twice to him]

I didn't check the Binary instance for arrays, however I belive it's
not true. Consider Binary instances for tuples:

instance (Binary a, Binary b) => Binary (a,b) where
   put (a,b)           = put a >> put b
   get                 = liftM2 (,) get get

instance (Binary a, Binary b, Binary c) => Binary (a,b,c) where
   put (a,b,c)         = put a >> put b >> put c
   get                 = liftM3 (,,) get get get

If what you are saying would be true, the tuple instances would be
incorrect for array tuples.

Best regards

Christopher Skrzętnicki
_______________________________________________
Haskell-Cafe mailing list
Haskell-Cafe@haskell.org
http://www.haskell.org/mailman/listinfo/haskell-cafe

Reply via email to