Data.Array.Unboxed
Copyright | (c) The University of Glasgow 2001 |
---|---|
License | BSD-style (see the file libraries/base/LICENSE) |
Maintainer | [email protected] |
Stability | experimental |
Portability | non-portable (uses Data.Array.IArray) |
Safe Haskell | Trustworthy |
Language | Haskell2010 |
Description
Unboxed immutable arrays.
Arrays with unboxed elements
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).
Instances
The overloaded immutable array interface
module Data.Array.IArray
© The University of Glasgow and others
Licensed under a BSD-style license (see top of the page).
https://downloads.haskell.org/~ghc/8.10.2/docs/html/libraries/array-0.5.4.0/Data-Array-Unboxed.html