Copyright | Copyright (c) 2009-2017 David Sorokin <david.sorokin@gmail.com> |
---|---|
License | BSD3 |
Maintainer | David Sorokin <david.sorokin@gmail.com> |
Stability | experimental |
Safe Haskell | None |
Language | Haskell2010 |
Simulation.Aivika.Ref.Base
Description
Tested with: GHC 8.0.1
This module defines a light-weight and more fast version of an updatable reference that depends on the event queue but that doesn't supply with the signal notification.
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
ResultComputing Ref Source # | |
ResultItemable (ResultValue a) => ResultProvider (Ref a) Source # | |
(Ix i, Show i, ResultItemable (ResultValue [e])) => ResultProvider (Ref (Array i e)) Source # | |
ResultItemable (ResultValue [e]) => ResultProvider (Ref (Vector e)) Source # | |
(ResultItemable (ResultValue a), ResultItemable (ResultValue (TimingStats a))) => ResultProvider (Ref (TimingCounter a)) Source # | |
(ResultItemable (ResultValue a), ResultItemable (ResultValue (SamplingStats a))) => ResultProvider (Ref (SamplingCounter a)) Source # | |
newRef :: a -> Simulation (Ref a) Source #
Create a new reference.