aivika-branches-0.4: 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-Inferred
LanguageHaskell2010

Simulation.Aivika.Branch.Ref.Base.Strict

Description

Tested with: GHC 7.10.3

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

Orphan instances

MonadRef (BR IO) Source #

The implementation of mutable references.

Instance details

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.

Instance details

Methods

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