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

Moduletext-2.1.3Haskell2010

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.3
  • 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.

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.