aivika-transformers-5.2: Transformers for the Aivika 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.Trans.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 m 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

MonadDES m => MonadCompTrans Cont m Source # 

Methods

liftComp :: m a -> Cont m a Source #

MonadDES m => ParameterLift Cont m Source # 

Methods

liftParameter :: Parameter m a -> Cont m a Source #

MonadDES m => SimulationLift Cont m Source # 

Methods

liftSimulation :: Simulation m a -> Cont m a Source #

MonadDES m => DynamicsLift Cont m Source # 

Methods

liftDynamics :: Dynamics m a -> Cont m a Source #

MonadDES m => EventLift Cont m Source # 

Methods

liftEvent :: Event m a -> Cont m a Source #

MonadDES m => Monad (Cont m) Source # 

Methods

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

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

return :: a -> Cont m a #

fail :: String -> Cont m a #

MonadDES m => Functor (Cont m) Source # 

Methods

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

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

MonadDES m => Applicative (Cont m) Source # 

Methods

pure :: a -> Cont m a #

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

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

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

(MonadDES m, MonadIO m) => MonadIO (Cont m) Source # 

Methods

liftIO :: IO a -> Cont m a #