aivika-transformers-4.5: Transformers for the Aivika simulation library

CopyrightCopyright (c) 2009-2016, David Sorokin <david.sorokin@gmail.com>
LicenseBSD3
MaintainerDavid Sorokin <david.sorokin@gmail.com>
Stabilityexperimental
Safe HaskellNone
LanguageHaskell2010

Simulation.Aivika.IO.Var

Contents

Description

Tested with: GHC 8.0.1

The MonadIO-based monad can be an instance MonadVar.

Orphan instances

(Monad m, MonadDES m, MonadIO m, MonadTemplate m) => MonadVar m Source #

The MonadIO based monad is an instance of MonadVar.

Associated Types

data Var (m :: * -> *) a :: * Source #

Methods

newVar :: a -> Simulation m (Var m a) Source #

varMemo :: Var m a -> Dynamics m a Source #

readVar :: Var m a -> Event m a Source #

writeVar :: Var m a -> a -> Event m () Source #

modifyVar :: Var m a -> (a -> a) -> Event m () Source #

freezeVar :: Var m a -> Event m (Array Int Double, Array Int a, Array Int a) Source #

varChanged :: Var m a -> Signal m a Source #

varChanged_ :: MonadDES m => Var m a -> Signal m () Source #