[Haskell-cafe] broken IO support in uvector package, when
using non primitive types
dons at galois.com
Fri Mar 13 18:27:56 EDT 2009
>> 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).
Just newtype your own UIO instance, if you need a different instance...
More information about the Haskell-Cafe