Safe Haskell | Safe-Inferred |
---|
- onNothing :: Monad m => m (Maybe b) -> m b -> m b
- type SessionData = Map TypeRep Dynamic
- emptySessionData :: Map k a
- setSessionData :: (MonadState SessionData m, Typeable a) => a -> m ()
- delSessionData :: (MonadState SessionData m, Typeable a) => a -> m ()
- getSessionData :: (Typeable a, MonadState SessionData m) => m (Maybe a)
- runs :: b -> StateT b IO a -> IO a
- main :: IO ()
Documentation
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.
emptySessionData :: Map k aSource
setSessionData :: (MonadState SessionData m, Typeable a) => a -> m ()Source
delSessionData :: (MonadState SessionData m, Typeable a) => a -> m ()Source
getSessionData :: (Typeable a, MonadState SessionData m) => m (Maybe a)Source
Get the session data of the desired type if there is any.