Suggestion re Data.Storable.Array
Paul Steckler
paul.steckler.ctr at metnet.navy.mil
Wed Apr 20 21:09:59 EDT 2005
Hi,
I recently needed to access C-like arrays
from Haskell. Everyone pointed me to
Data.Storable.Array, but that wasn't quite
what I wanted. The MArray class that provides
the interface for storable arrays insists that
it create the storage via newArray or newArray_.
But I already had the C storage I needed; I justed
wanted to wrap that in Haskell.
I cons'ed up my own primitives, which work just
fine, but it would be nice to just use something
already in the libraries. Concretely, adding
a way to create a storable array from an existing
Ptr would've done the trick. I can see that's
less safe, but sometimes you have to live
dangerously!
-- Paul
More information about the Libraries
mailing list