W3cubDocs

/Haskell 9

Control.Concurrent.STM.TArray

Copyright (c) The University of Glasgow 2005
License BSD-style (see the file libraries/base/LICENSE)
Maintainer [email protected]
Stability experimental
Portability non-portable (requires STM)
Safe Haskell Trustworthy
Language Haskell2010

Description

data TArray i e Source

TArray is a transactional array, supporting the usual MArray interface for mutable arrays.

It is conceptually implemented as Array i (TVar e).

Instances
Instances details
MArray TArray e STM Source
Instance details

Defined in Control.Concurrent.STM.TArray

Methods

getBounds :: Ix i => TArray i e -> STM (i, i) Source

getNumElements :: Ix i => TArray i e -> STM Int Source

newArray :: Ix i => (i, i) -> e -> STM (TArray i e) Source

newArray_ :: Ix i => (i, i) -> STM (TArray i e) Source

unsafeNewArray_ :: Ix i => (i, i) -> STM (TArray i e) Source

unsafeRead :: Ix i => TArray i e -> Int -> STM e Source

unsafeWrite :: Ix i => TArray i e -> Int -> e -> STM () Source

MArray TArray e IO Source

Writes are slow in IO.

Instance details

Defined in Control.Concurrent.STM.TArray

Methods

getBounds :: Ix i => TArray i e -> IO (i, i) Source

getNumElements :: Ix i => TArray i e -> IO Int Source

newArray :: Ix i => (i, i) -> e -> IO (TArray i e) Source

newArray_ :: Ix i => (i, i) -> IO (TArray i e) Source

unsafeNewArray_ :: Ix i => (i, i) -> IO (TArray i e) Source

unsafeRead :: Ix i => TArray i e -> Int -> IO e Source

unsafeWrite :: Ix i => TArray i e -> Int -> e -> IO () Source

(Eq i, Eq e) => Eq (TArray i e) Source
Instance details

Defined in Control.Concurrent.STM.TArray

Methods

(==) :: TArray i e -> TArray i e -> Bool

(/=) :: TArray i e -> TArray i e -> Bool

© The University of Glasgow and others
Licensed under a BSD-style license (see top of the page).
https://downloads.haskell.org/~ghc/9.12.1/docs/libraries/stm-2.5.3.1-9996/Control-Concurrent-STM-TArray.html