| Copyright | (c) The University of Glasgow 2004 |
|---|---|
| License | BSD-style (see the file libraries/base/LICENSE) |
| Maintainer | [email protected] |
| Stability | experimental |
| Portability | non-portable (requires STM) |
| Safe Haskell | Trustworthy |
| Language | Haskell2010 |
Software Transactional Memory: a modular composable concurrency abstraction. See
This module only defines the STM monad; you probably want to import Control.Concurrent.STM (which exports Control.Monad.STM).
Note that invariant checking (namely the always and alwaysSucceeds functions) has been removed. See ticket #14324 and the removal proposal. Existing users are encouraged to encapsulate their STM operations in safe abstractions which can perform the invariant checking without help from the runtime system.
data STM a
| Alternative STM | |
| Applicative STM | |
| Functor STM | |
| Monad STM | |
| MonadPlus STM | |
| MonadFix STM Source | Since: stm-2.3 |
Defined in Control.Monad.STM | |
| MArray TArray e STM Source | |
Defined in Control.Concurrent.STM.TArray MethodsgetBounds :: 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 | |
| Monoid a => Monoid (STM a) | |
| Semigroup a => Semigroup (STM a) | |
atomically :: STM a -> IO a
orElse :: STM a -> STM a -> STM a
check :: Bool -> STM () Source
Check that the boolean condition is true and, if not, retry.
In other words, check b = unless b retry.
Since: stm-2.1.1
throwSTM :: Exception e => e -> STM a
catchSTM :: Exception e => STM a -> (e -> STM a) -> STM a
© 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-Monad-STM.html