missing support to Data.Binary for uvector package

Hi. I'm still having problems with the uvector package. I have an IntMap (UArr xxx) data type, and I want to serialize it to disk, in binary format. I'm using the uvector package from http://patch-tag.com/repo/pumpkin-uvector/home The problem is with missing instance declarations, for Hyperstrict data type and Data.Array.Vector.UArr.UPrim. For the former, the instance is simple, but for the latter I have no idea about what to do. The full error message (GHC 6.8.2): No instance for (uvector-0.2:Data.Array.Vector.UArr.UPrim (Word32 uvector-0.2:Data.Array.Vector.Prim.Hyperstrict.:*: Word8)) arising from a use of `encode' at bin/process-data-1.hs:72:18-36 Possible fix: add an instance declaration for (uvector-0.2:Data.Array.Vector.UArr.UPrim (Word32 uvector-0.2:Data.Array.Vector.Prim.Hyperstrict.:*: Word8)) Thanks Manlio Perillo

Hi Manlio,
I'm not sure the whole list wants to hear about bugs in my
modifications to an alpha library! :-)
But basically, I haven't added a Binary instance for productions like
that yet. This isn't trivial, but shouldn't be hard. Otherwise, using
the unsafe serialization functions I provide in that same module might
give you better luck (at the cost of some safety).
But uvector, no matter how awesome the fusion work Don and others did
on it, is definitely not "finished" yet. Be prepared to hack a lot
(and maybe crash a fair amount) if you want to use it.
Hope this helps,
Dan
On Thu, Mar 5, 2009 at 9:54 AM, Manlio Perillo
Hi.
I'm still having problems with the uvector package.
I have an IntMap (UArr xxx) data type, and I want to serialize it to disk, in binary format.
I'm using the uvector package from http://patch-tag.com/repo/pumpkin-uvector/home
The problem is with missing instance declarations, for Hyperstrict data type and Data.Array.Vector.UArr.UPrim.
For the former, the instance is simple, but for the latter I have no idea about what to do.
The full error message (GHC 6.8.2):
No instance for (uvector-0.2:Data.Array.Vector.UArr.UPrim (Word32 uvector-0.2:Data.Array.Vector.Prim.Hyperstrict.:*: Word8)) arising from a use of `encode' at bin/process-data-1.hs:72:18-36 Possible fix: add an instance declaration for (uvector-0.2:Data.Array.Vector.UArr.UPrim (Word32 uvector-0.2:Data.Array.Vector.Prim.Hyperstrict.:*: Word8))
Thanks Manlio Perillo _______________________________________________ Haskell-Cafe mailing list Haskell-Cafe@haskell.org http://www.haskell.org/mailman/listinfo/haskell-cafe

manlio_perillo:
Hi.
I'm still having problems with the uvector package.
I have an IntMap (UArr xxx) data type, and I want to serialize it to disk, in binary format.
I'm using the uvector package from http://patch-tag.com/repo/pumpkin-uvector/home
The problem is with missing instance declarations, for Hyperstrict data type and Data.Array.Vector.UArr.UPrim.
For the former, the instance is simple, but for the latter I have no idea about what to do.
The full error message (GHC 6.8.2):
No instance for (uvector-0.2:Data.Array.Vector.UArr.UPrim (Word32 uvector-0.2:Data.Array.Vector.Prim.Hyperstrict.:*: Word8)) arising from a use of `encode' at bin/process-data-1.hs:72:18-36 Possible fix: add an instance declaration for (uvector-0.2:Data.Array.Vector.UArr.UPrim (Word32 uvector-0.2:Data.Array.Vector.Prim.Hyperstrict.:*: Word8))
uvector is alpha/experimental. You should expect to write instances/patches if you chose to use it! -- Don
participants (3)
-
Daniel Peebles
-
Don Stewart
-
Manlio Perillo