Immutable array type.
Moduletext-2.1.4Haskell2010
Data.Text.Array
Packed, unboxed, heap-resident arrays. Suitable for performance critical use, both in terms of large data quantities and high speed.
This module is intended to be imported qualified, to avoid name
clashes with Prelude functions, e.g.
import qualified Data.Text.Array as AThe names in this module resemble those in the Data.Array family
of modules, but are shorter due to the assumption of qualified
naming.
Synopsis
- type Array
- constructor ByteArray
- type MArray
- constructor MutableByteArray
- value resizeM
- value shrinkM
- value copyM
- value copyI
- value copyFromPointer
- value copyToPointer
- value empty
- value equal
- value compare
- value run
- value run2
- value toList
- value unsafeFreeze
- value unsafeIndex
- value new
- value newPinned
- value newFilled
- value unsafeWrite
- value tile
- value getSizeofMArray
- Packagetext-2.1.4
- Exports24
- LanguageHaskell2010
- LicenceBSD-2-Clause
- SourceArray.hs
Types
Mutable array type, for use in the ST monad.
Functions
copyM Copy some elements of a mutable array.
copyI Copy some elements of an immutable array.
copyFromPointer Copy from pointer.
copyToPointer Copy to pointer.
An empty immutable array.
equal Compare portions of two arrays for equality. No bounds checking is performed.
compare Compare portions of two arrays. No bounds checking is performed.
Run an action in the ST monad and return an immutable array of its result.
Run an action in the ST monad and return an immutable array of its result paired with whatever else the action returns.
Convert an immutable array to a list.
Freeze a mutable array. Do not mutate the MArray afterwards!
Unchecked read of an immutable array. May return garbage or crash on an out-of-bounds access.
Create an uninitialized mutable array.
Create an uninitialized mutable pinned array.
Unchecked write of a mutable array. May return garbage or crash on an out-of-bounds access.