| Stability | experimental |
|---|---|
| Maintainer | David Sorokin <david.sorokin@gmail.com> |
| Safe Haskell | Safe-Inferred |
Simulation.Aivika.Ref
Description
Tested with: GHC 7.8.3
This module defines an updatable reference that depends on the event queue.
Documentation
The Ref type represents a mutable variable similar to the IORef variable
but only dependent on the event queue, which allows synchronizing the reference
with the model explicitly through the Event monad.
Instances
refChanged :: Ref a -> Signal aSource
Return a signal that notifies about every change of the reference state.
refChanged_ :: Ref a -> Signal ()Source
Return a signal that notifies about every change of the reference state.
newRef :: a -> Simulation (Ref a)Source
Create a new reference.