aivika-lattice-0.1: Nested discrete event simulation module for the Aivika library using lattice

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

Simulation.Aivika.Lattice.Ref.Base

Contents

Description

Tested with: GHC 7.10.3

Here is an implementation of mutable references, where LIO is an instance of MonadRef and MonadRef0.

Orphan instances

MonadRef LIO Source #

The implementation of mutable references.

Associated Types

data Ref (LIO :: * -> *) a :: * #

Methods

newRef :: a -> Simulation LIO (Ref LIO a) #

readRef :: Ref LIO a -> Event LIO a #

writeRef :: Ref LIO a -> a -> Event LIO () #

modifyRef :: Ref LIO a -> (a -> a) -> Event LIO () #

equalRef :: Ref LIO a -> Ref LIO a -> Bool #

MonadRef0 LIO Source #

A subtype of mutable references that can be created under more weak conditions.

Methods

newRef0 :: a -> LIO (Ref LIO a) #

Observable (Ref LIO) (Estimate LIO) Source #

An instance of the specified type class.

Methods

readObservable :: Ref LIO a -> Estimate LIO a #