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 HaskellNone
LanguageHaskell98

Simulation.Aivika.Branch.BR

Contents

Description

Tested with: GHC 7.10.3

This module defines that BR can be an instance of the MonadDES and EventIOQueueing type classes.

Synopsis

Documentation

data BR m a Source #

The branching computation.

Instances

MonadTrans BR Source # 

Methods

lift :: Monad m => m a -> BR m a #

Monad m => Monad (BR m) Source # 

Methods

(>>=) :: BR m a -> (a -> BR m b) -> BR m b #

(>>) :: BR m a -> BR m b -> BR m b #

return :: a -> BR m a #

fail :: String -> BR m a #

Functor m => Functor (BR m) Source # 

Methods

fmap :: (a -> b) -> BR m a -> BR m b #

(<$) :: a -> BR m b -> BR m a #

MonadFix m => MonadFix (BR m) Source # 

Methods

mfix :: (a -> BR m a) -> BR m a #

Applicative m => Applicative (BR m) Source # 

Methods

pure :: a -> BR m a #

(<*>) :: BR m (a -> b) -> BR m a -> BR m b #

(*>) :: BR m a -> BR m b -> BR m b #

(<*) :: BR m a -> BR m b -> BR m a #

MonadException m => MonadException (BR m) Source # 

Methods

catchComp :: Exception e => BR m a -> (e -> BR m a) -> BR m a #

finallyComp :: BR m a -> BR m b -> BR m a #

throwComp :: Exception e => e -> BR m a #

MonadIO m => MonadIO (BR m) Source # 

Methods

liftIO :: IO a -> BR m a #

data Ref (BR IO) # 
data Ref (BR IO) = Ref {}
data Ref (BR IO) # 
data Ref (BR IO) = Ref {}
data EventQueue (BR IO) # 
data Generator (BR IO) # 
data StrategyQueue (BR IO) FCFS # 
data StrategyQueue (BR IO) LCFS # 

runBR :: MonadIO m => BR m a -> m a Source #

Run the branching computation.

branchLevel :: Monad m => BR m Int Source #

Return the current branch level starting from 0.

Orphan instances

EventIOQueueing (BR IO) Source #

An implementation of the EventIOQueueing type class.

Methods

enqueueEventIO :: Double -> Event (BR IO) () -> Event (BR IO) () #

MonadDES (BR IO) Source # 
MonadComp (BR IO) Source #