
On Wed, Nov 07, 2007 at 10:10:16PM +0000, Jules Bean wrote:
Joel Reymont wrote:
Is there such a thing as memory-mapped arrays in GHC?
In principle, there could be an IArray instance to memory-mapped files.
(There could also be a mutable version, but just the IArray version would be useful).
I noticed just the other day that there are some 'obvious' IArray constructors missing. It ought, for example, be possible to build a new IArray from an old from a subset of the elements; a dimensional slice going from an (Int,Int,Int) indexed array to (Int,Int), or a stride taking 'one element in three' along each axis, etc.
Annoyingly, it doesn't seem to be straightforward to make your own instances of IArray, since the important methods aren't exported.
They are, from the undocumented module Data.Array.Base. Stefan