Jules Bean wrote:
As far as I'm aware, our arrays don't support any kind of zero-copy slicing, which is what your 'drop' trick amounts to.

Zero-copy slicing would seem like an obviously nice thing to have for IArrays, though, I agree. For various different kinds of slices including projections.

ByteString supports zero-copy substring, but it's based on ForeignPtr not UArray.

This is one of the many things I am often tempted to try to implement myself...

In general, the IArray and MArray interfaces seem to be lacking a huge number of functions which logically *should* be quite possible on an array, they just aren't implemented. Maybe one day I'll sit down and make a serious attempt to catelogue and implement them all...

_______________________________________________
Haskell-Cafe mailing list
Haskell-Cafe@haskell.org
http://www.haskell.org/mailman/listinfo/haskell-cafe

Reply via email to