|
|
|
|
|
|
Synopsis |
|
|
|
|
The specification of STM
|
|
|
An expression of type IOSpec STMS a corresponds to an IO
computation that may use atomically and returns a value of type
a.
By itself, STMS is not terribly useful. You will probably want
to use IOSpec (ForkS :+: STMS).
| Instances | |
|
|
Atomically
|
|
|
The atomically function atomically executes an STM action.
|
|
The STM monad
|
|
|
Instances | |
|
|
|
A TVar is a shared, mutable variable used by STM.
|
|
|
|
The newTVar function creates a new transactional variable.
|
|
|
The readTVar function reads the value stored in a
transactional variable.
|
|
|
The writeTVar function overwrites the value stored in a
transactional variable.
|
|
|
The retry function abandons a transaction and retries at some
later time.
|
|
|
The orElse function takes two STM actions stm1 and stm2 and
performs stm1. If stm1 calls retry it performs stm2. If stm1
succeeds, on the other hand, stm2 is not executed.
|
|
|
The check function checks if its boolean argument holds. If
the boolean is true, it returns (); otherwise it calls retry.
|
|
Produced by Haddock version 2.4.2 |