aivika-transformers-6.1: 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 HaskellSafe-Inferred
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

Instances details
MonadDES m => MonadCompTrans Cont m Source # 
Instance details

Defined in Simulation.Aivika.Trans.Internal.Cont

Methods

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

MonadDES m => DynamicsLift Cont m Source # 
Instance details

Defined in Simulation.Aivika.Trans.Internal.Cont

Methods

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

MonadDES m => EventLift Cont m Source # 
Instance details

Defined in Simulation.Aivika.Trans.Internal.Cont

Methods

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

MonadDES m => ParameterLift Cont m Source # 
Instance details

Defined in Simulation.Aivika.Trans.Internal.Cont

Methods

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

MonadDES m => SimulationLift Cont m Source # 
Instance details

Defined in Simulation.Aivika.Trans.Internal.Cont

Methods

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

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

Defined in Simulation.Aivika.Trans.Internal.Cont

Methods

liftIO :: IO a -> Cont m a #

MonadDES m => Applicative (Cont m) Source # 
Instance details

Defined in Simulation.Aivika.Trans.Internal.Cont

Methods

pure :: a -> Cont m a #

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

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

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

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

MonadDES m => Functor (Cont m) Source # 
Instance details

Defined in Simulation.Aivika.Trans.Internal.Cont

Methods

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

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

MonadDES m => Monad (Cont m) Source # 
Instance details

Defined in Simulation.Aivika.Trans.Internal.Cont

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 #

MonadDES m => MonadCatch (Cont m) Source # 
Instance details

Defined in Simulation.Aivika.Trans.Internal.Cont

Methods

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

MonadDES m => MonadThrow (Cont m) Source # 
Instance details

Defined in Simulation.Aivika.Trans.Internal.Cont

Methods

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