HORIZON HASKELLDocslts/ghc-9.10.xc74966e2026-09-27Search names, modules, packages, or :: a typeCtrl K

GHC 9.10.3 · lts/ghc-9.10.x · c74966e · 2026-09-27

Moduleprimitive-unlifted-2.1.0.0Haskell2010

Data.Primitive.TArray.Classic

This module is a drop-in replacement for Control.Concurrent.STM.TArray in the stm package. It has the same fundamental inefficiency of the classic TArray, but it's a little faster and more compact. Specifically, this implementation uses two fewer words of memory and one fewer indirection per element. We also add an MArray instance for working in IO that the stm version lacks. Finally, the Eq instance for the official TArray is currently a little broken thanks to a bug in the instance for Data.Array.Array (See GHC Gitlab issue #18700). We fix that bug here.

  • 1 type
datadata TArray i a
#
Instances3MArray, Eq
  • MArray TArray e STMDefined in primitive-unlifted-2.1.0.0 · Data.Primitive.TArray.Classic
  • MArray TArray e IODefined in primitive-unlifted-2.1.0.0 · Data.Primitive.TArray.Classic

    Writes are slow in IO.

  • Eq i => Eq (TArray i a)Defined in primitive-unlifted-2.1.0.0 · Data.Primitive.TArray.Classic