Any chance IArrays (or MArrays) will some day support something like:

resize :: (Ix ix, IArray a e) =>
          a ix e -> (ix,ix) -> a ix e

that is faster than allocating a new array and then copying
value-by-value?  perhaps make the result a Maybe (a ix e) in the same way
that realloc can return null if it can't get you more memory at the end 

or even just a simple memcpy like function so you could allocate a new
array with the same index and element type and then copy directly from one
to the other, like:

arrcopy :: (Ix ix, IArray a e) =>
           (ix -> ix) -> a ix e -> a ix e -> a ix e

which can possibly fail if the indices for the destination don't line up
with the source properly?

i don't know enough about how UArrays are implemented in ghc to know if
this is even reasonable, but if it's possible, can we expect to see
something like this?  :)

 - Hal

--
Hal Daume III

 "Computer science is no more about computers    | [EMAIL PROTECTED]
  than astronomy is about telescopes." -Dijkstra | www.isi.edu/~hdaume

_______________________________________________
Glasgow-haskell-users mailing list
[EMAIL PROTECTED]
http://www.haskell.org/mailman/listinfo/glasgow-haskell-users

Reply via email to