Questions about the array APIs

Donald Bruce Stewart dons at cse.unsw.edu.au
Fri Nov 17 20:35:31 EST 2006


iavor.diatchki:
> Hello,
> 
> I am aware of the unsafe methods to cast arrays.  My question was if
> there was a function in the libraries to dump an immutable array of
> bytes to a handle, that is safe (it could, of course, be implemented
> behind the scene using unsafe primitives, however, this is
> implementation specific).  My impression was that there isn't one, and
> I guess you are confirming this.  I think it would be useful to have
> such a function in the libraries.

If its arrays of bytes only you're working with, you might use
Data.ByteString. Malcolm found it to be a bit faster than UArrays of
Word8, if I recall, and it has lots of IO operations.

-- Don


More information about the Libraries mailing list