cassava
cassava copied to clipboard
Support Data.Vector.Storable
Hi,
decode
currently returns a Data.Vector.Vector
. If, however, you want to parse CSV data for further numerical processing, e.g. with hmatrix
, then a Data.Vector.Storable.Vector
would be required. Manual conversion between both types can be cumbersome, so the question is whether cassava
could support both Vector
and Storable.Vector
?
Making the inner vector (i.e. when we return a Vector (Vector a))
) Storable
should work, we already support unboxed inner vectors. Making the outermost vector storable is a bit trickier, as the decode
function would need to be even more polymorphic in its return type.
Thanks for answering so quickly. By "should work" you mean that it should already work out of the box or that it should (more or less easily) work out to implement it this way in cassava?
The latter.
Alright, thanks.