Copyright | (c) The University of Glasgow 2005 |
---|---|
License | BSD-style (see the file libraries/base/LICENSE) |
Maintainer | libraries@haskell.org |
Stability | experimental |
Portability | non-portable (requires STM) |
Safe Haskell | Trustworthy |
Language | Haskell2010 |
Synopsis
- data TArray i e
Documentation
TArray
is a transactional array, supporting the usual MArray
interface for mutable arrays.
It is conceptually implemented as Array i (TVar e)
.
Instances
MArray TArray e STM Source # | |
Defined in Control.Concurrent.STM.TArray 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 () | |
MArray TArray e IO Source # | Writes are slow in |
Defined in Control.Concurrent.STM.TArray getBounds :: Ix i => TArray i e -> IO (i, i) # getNumElements :: Ix i => TArray i e -> IO Int newArray :: Ix i => (i, i) -> e -> IO (TArray i e) # newArray_ :: Ix i => (i, i) -> IO (TArray i e) # unsafeNewArray_ :: Ix i => (i, i) -> IO (TArray i e) unsafeRead :: Ix i => TArray i e -> Int -> IO e unsafeWrite :: Ix i => TArray i e -> Int -> e -> IO () | |
Ix i => Eq (TArray i e) Source # | |