HORIZON HASKELLDocslts/ghc-10.0.x8174fa42026-10-11Search names, modules, packages, or :: a typeCtrl K

GHC 10.0.0.20260917 · lts/ghc-10.0.x · 8174fa4 · 2026-10-11

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 A

The names in this module resemble those in the Data.Array family of modules, but are shorter due to the assumption of qualified naming.

  • 2 types
  • 20 values
  • Packagetext-2.1.4
  • Exports24
  • LanguageHaskell2010
  • LicenceBSD-2-Clause
  • SourceArray.hs

Types

4 declarations

Functions

20 declarations
valuecopyM
  1. :: MArray s

    Destination

  2. -> Int

    Destination offset

  3. -> MArray s

    Source

  4. -> Int

    Source offset

  5. -> Int

    Count

  6. -> ST s ()
#

Copy some elements of a mutable array.

valuecopyI
  1. :: Int

    Count

  2. -> MArray s

    Destination

  3. -> Int

    Destination offset

  4. -> Array

    Source

  5. -> Int

    Source offset

  6. -> ST s ()
#

Copy some elements of an immutable array.

valueequal
  1. :: Array

    First array

  2. -> Int

    Offset in the first array

  3. -> Array

    Second array

  4. -> Int

    Offset in the second array

  5. -> Int

    How many bytes to compare?

  6. -> Bool
#

Compare portions of two arrays for equality. No bounds checking is performed.

valuecompare
  1. :: Array

    First array

  2. -> Int

    Offset in the first array

  3. -> Array

    Second array

  4. -> Int

    Offset in the second array

  5. -> Int

    How many bytes to compare?

  6. -> Ordering
#

Compare portions of two arrays. No bounds checking is performed.

valuerun :: (forall s. ST s (MArray s)) -> Array
#

Run an action in the ST monad and return an immutable array of its result.

valuerun2 :: (forall s. ST s (MArray s, a)) -> (Array, a)
#

Run an action in the ST monad and return an immutable array of its result paired with whatever else the action returns.

valueunsafeIndex :: Array -> Int -> Word8
#

Unchecked read of an immutable array. May return garbage or crash on an out-of-bounds access.

valuenew :: Int -> ST s (MArray s)
#

Create an uninitialized mutable array.

valueunsafeWrite :: MArray s -> Int -> Word8 -> ST s ()
#

Unchecked write of a mutable array. May return garbage or crash on an out-of-bounds access.