supervisor-0.1.1.0: Control an internal monad execution for trace generation, backtrakcking, testing and other purposes

Safe HaskellSafe-Inferred

Control.Monad.Supervisor.Session

Description

 

Synopsis

Documentation

onNothing :: Monad m => m (Maybe b) -> m b -> m bSource

type SessionData = Map TypeRep DynamicSource

Set user-defined data in the context of the session.

The data is indexed by type in a map. So the user can insert-retrieve different kinds of data in the session context to add different behaviours to the supervisor monad.

getSessionData :: (Typeable a, MonadState SessionData m) => m (Maybe a)Source

Get the session data of the desired type if there is any.

runs :: b -> StateT b IO a -> IO aSource