[Haskell-cafe] broken IO support in uvector package, when using
non primitive types
Manlio Perillo
manlio_perillo at libero.it
Fri Mar 13 18:13:24 EDT 2009
Daniel Peebles ha scritto:
> As far as I know, the reason for this is that the UIO instance for
> productions writes the two "rows" out sequentially to file, but
> doesn't include any means to determine the length of the two halves
> when it's loading up again. When you try to read the production back
> in, it tries to read in two arrays, but the first array read consumes
> all the input leaving the second with nothing.
>
Ok, thanks.
For now, I think that the simple solution is to not use UArr (a:*:b), but
(UArr a, UArr b).
Or I should just switch to Data.Array.Unboxed.
The operations I need with the array are only:
- sum of elements
- binary search
- serialization/deserialization
- sorting (but right now I sort the list before creating the array)
with a very big data set.
For my problem, is uvector the best solution?
What about storablevector or cvector, instead?
Regards Manlio
More information about the Haskell-Cafe
mailing list