array- Mutable and immutable arraysSource codeContentsIndex
Portabilitynon-portable (uses Data.Array.IArray)
Arrays with unboxed elements
The overloaded immutable array interface
Unboxed immutable arrays.
data UArray i e
module Data.Array.IArray
Arrays with unboxed elements
data UArray i e Source

Arrays with unboxed elements. Instances of IArray are provided for UArray with certain element types (Int, Float, Char, etc.; see the UArray class for a full list).

A UArray will generally be more efficient (in terms of both time and space) than the equivalent Data.Array.Array with the same element type. However, UArray is strict in its elements - so don't use UArray if you require the non-strictness that Data.Array.Array provides.

Because the IArray interface provides operations overloaded on the type of the array, it should be possible to just change the array type being used by a program from say Array to UArray to get the benefits of unboxed arrays (don't forget to import Data.Array.Unboxed instead of Data.Array).

show/hide Instances
The overloaded immutable array interface
module Data.Array.IArray
Produced by Haddock version 2.4.2