aivika-5.8: A multi-method simulation library

CopyrightCopyright (c) 2009-2017 David Sorokin <david.sorokin@gmail.com>
LicenseBSD3
MaintainerDavid Sorokin <david.sorokin@gmail.com>
Stabilityexperimental
Safe HaskellNone
LanguageHaskell2010

Simulation.Aivika.Cont

Description

Tested with: GHC 8.0.1

The Cont monad is a variation of the standard Cont monad and F# async workflow, where the result of applying the continuations is the Event computation.

Synopsis

Documentation

data ContCancellation Source #

It defines how the parent and child computations should be cancelled.

Constructors

CancelTogether

Cancel the both computations together.

CancelChildAfterParent

Cancel the child if its parent is cancelled.

CancelParentAfterChild

Cancel the parent if its child is cancelled.

CancelInIsolation

Cancel the computations in isolation.

data Cont a Source #

The Cont type is similar to the standard Cont monad and F# async workflow but only the result of applying the continuations return the Event computation.

Instances
Monad Cont Source # 
Instance details

Defined in Simulation.Aivika.Internal.Cont

Methods

(>>=) :: Cont a -> (a -> Cont b) -> Cont b #

(>>) :: Cont a -> Cont b -> Cont b #

return :: a -> Cont a #

fail :: String -> Cont a #

Functor Cont Source # 
Instance details

Defined in Simulation.Aivika.Internal.Cont

Methods

fmap :: (a -> b) -> Cont a -> Cont b #

(<$) :: a -> Cont b -> Cont a #

Applicative Cont Source # 
Instance details

Defined in Simulation.Aivika.Internal.Cont

Methods

pure :: a -> Cont a #

(<*>) :: Cont (a -> b) -> Cont a -> Cont b #

liftA2 :: (a -> b -> c) -> Cont a -> Cont b -> Cont c #

(*>) :: Cont a -> Cont b -> Cont b #

(<*) :: Cont a -> Cont b -> Cont a #

MonadIO Cont Source # 
Instance details

Defined in Simulation.Aivika.Internal.Cont

Methods

liftIO :: IO a -> Cont a #

MonadThrow Cont Source # 
Instance details

Defined in Simulation.Aivika.Internal.Cont

Methods

throwM :: Exception e => e -> Cont a #

MonadCatch Cont Source # 
Instance details

Defined in Simulation.Aivika.Internal.Cont

Methods

catch :: Exception e => Cont a -> (e -> Cont a) -> Cont a #

ParameterLift Cont Source # 
Instance details

Defined in Simulation.Aivika.Internal.Cont

SimulationLift Cont Source # 
Instance details

Defined in Simulation.Aivika.Internal.Cont

DynamicsLift Cont Source # 
Instance details

Defined in Simulation.Aivika.Internal.Cont

Methods

liftDynamics :: Dynamics a -> Cont a Source #

EventLift Cont Source # 
Instance details

Defined in Simulation.Aivika.Internal.Cont

Methods

liftEvent :: Event a -> Cont a Source #