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

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

Simulation.Aivika.Branch.Ref.Base.Lazy

Contents

Description

Tested with: GHC 7.10.3

Here is an implementation of lazy mutable references, where BR can be an instance of MonadRef and MonadRef0.

Orphan instances

MonadRef (BR IO) Source #

The implementation of mutable references.

Associated Types

data Ref (BR IO :: * -> *) a :: * #

Methods

newRef :: a -> Simulation (BR IO) (Ref (BR IO) a) #

readRef :: Ref (BR IO) a -> Event (BR IO) a #

writeRef :: Ref (BR IO) a -> a -> Event (BR IO) () #

modifyRef :: Ref (BR IO) a -> (a -> a) -> Event (BR IO) () #

equalRef :: Ref (BR IO) a -> Ref (BR IO) a -> Bool #

MonadRef0 (BR IO) Source #

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

Methods

newRef0 :: a -> BR IO (Ref (BR IO) a) #