lifted-stm-0.2: STM operations lifted through monad transformer stacks

Safe HaskellNone
LanguageHaskell2010

Control.Concurrent.STM.TArray.Lifted

Contents

Description

Lifted TArray operations.

Synopsis

Documentation

data TArray i e #

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

It is currently implemented as Array ix (TVar e), but it may be replaced by a more efficient implementation in the future (the interface will remain the same, however).

Instances
MonadBase STM μ => MArray TArray e μ # 
Instance details

Defined in Control.Concurrent.STM.TArray.Lifted

Methods

getBounds :: Ix i => TArray i e -> μ (i, i) #

getNumElements :: Ix i => TArray i e -> μ Int

newArray :: Ix i => (i, i) -> e -> μ (TArray i e) #

newArray_ :: Ix i => (i, i) -> μ (TArray i e) #

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

unsafeRead :: Ix i => TArray i e -> Int -> μ e

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

MArray TArray e STM 
Instance details

Defined in Control.Concurrent.STM.TArray

Methods

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

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

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

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

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

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

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

Ix i => Eq (TArray i e) 
Instance details

Defined in Control.Concurrent.STM.TArray

Methods

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

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

Orphan instances

MonadBase STM μ => MArray TArray e μ Source # 
Instance details

Methods

getBounds :: Ix i => TArray i e -> μ (i, i) #

getNumElements :: Ix i => TArray i e -> μ Int

newArray :: Ix i => (i, i) -> e -> μ (TArray i e) #

newArray_ :: Ix i => (i, i) -> μ (TArray i e) #

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

unsafeRead :: Ix i => TArray i e -> Int -> μ e

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