HORIZON HASKELLDocslts/ghc-9.10.x248f8f02026-10-05Search names, modules, packages, or :: a typeCtrl K

GHC 9.10.3 · lts/ghc-9.10.x · 248f8f0 · 2026-10-05

Modulearray-0.5.8.0Haskell2010

Data.Array.Unboxed

Unboxed immutable arrays.

  • 1 type
  • Packagearray-0.5.8.0
  • Exports1
  • LanguageHaskell2010
  • LicenceBSD-3-Clause
  • SourceUnboxed.hs

Arrays with unboxed elements

1 declaration
datadata UArray i e
#

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 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 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).

Instances21IArray, Eq, Ord, Read, Show, …

The overloaded immutable array interface

0 declarations