Copyright | (c) 2016 Michael Walker |
---|---|
License | MIT |
Maintainer | Michael Walker <mike@barrucadu.co.uk> |
Stability | stable |
Portability | FlexibleInstances, MultiParamTypeClasses |
Safe Haskell | Safe-Inferred |
Language | Haskell2010 |
Deviations: TArray
as defined here does not have an Eq
instance, this is because the MonadSTM
TVar
type does not have
an Eq
constraint.
Synopsis
- data TArray stm i e
Documentation
TArray
is a transactional array, supporting the usual MArray
interface for mutable arrays.
It is currently implemented as Array ix (TVar stm e)
, but it may
be replaced by a more efficient implementation in the future (the
interface will remain the same, however).
Since: 1.0.0.0
Instances
MonadSTM stm => MArray (TArray stm) e stm Source # | Since: 1.0.0.0 |
Defined in Control.Concurrent.Classy.STM.TArray getBounds :: Ix i => TArray stm i e -> stm (i, i) # getNumElements :: Ix i => TArray stm i e -> stm Int newArray :: Ix i => (i, i) -> e -> stm (TArray stm i e) # newArray_ :: Ix i => (i, i) -> stm (TArray stm i e) # unsafeNewArray_ :: Ix i => (i, i) -> stm (TArray stm i e) unsafeRead :: Ix i => TArray stm i e -> Int -> stm e unsafeWrite :: Ix i => TArray stm i e -> Int -> e -> stm () |