Stability | experimental |
---|---|
Maintainer | David Sorokin <david.sorokin@gmail.com> |
Safe Haskell | Safe-Infered |
Tested with: GHC 7.0.3
This module defines a variable that is bound to the event queue and that keeps the history of changes storing the values in an array.
Documentation
Like the Ref
reference but keeps the history of changes in
different time points. The Var
variable is safe in the hybrid
simulation and when you use different event queues, but this variable is
slower than references.
varQueue :: Var a -> EventQueueSource
Return the bound event queue.
newVar :: EventQueue -> a -> Simulation (Var a)Source
Create a new variable bound to the specified event queue.
readVar :: Var a -> Dynamics aSource
Read the value of a variable, forcing the bound event queue to raise the events in case of need.