aivika-branches-0.1.3: Nested discrete event simulation module for the Aivika library

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

Simulation.Aivika.Branch.Ref.Base

Contents

Description

Tested with: GHC 7.10.3

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

Orphan instances

MonadRef BrIO Source #

The implementation of mutable references.

Associated Types

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

Methods

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

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

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

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

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

MonadRef0 BrIO Source #

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

Methods

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