distributed-process-lifted-0.3.0.1: monad-control style typeclass and transformer instances for Process monad.

Safe HaskellNone
LanguageHaskell2010

Control.Distributed.Process.Lifted.Class

Synopsis

Documentation

class (Monad m, MonadIO m, MonadBase IO m, MonadBaseControl IO m) => MonadProcess m where Source #

A class into instances of which Process operations can be lifted; similar to MonadIO or MonadBase.

Minimal complete definition

liftP

Methods

liftP :: Process a -> m a Source #

lift a base Process computation into the current monad

Instances

MonadProcess Process Source # 

Methods

liftP :: Process a -> Process a Source #

MonadProcess m => MonadProcess (ListT m) Source # 

Methods

liftP :: Process a -> ListT m a Source #

MonadProcess m => MonadProcess (MaybeT m) Source # 

Methods

liftP :: Process a -> MaybeT m a Source #

MonadProcess m => MonadProcess (ExceptT e m) Source # 

Methods

liftP :: Process a -> ExceptT e m a Source #

(Monoid w, MonadProcess m) => MonadProcess (WriterT w m) Source # 

Methods

liftP :: Process a -> WriterT w m a Source #

MonadProcess m => MonadProcess (StateT s m) Source # 

Methods

liftP :: Process a -> StateT s m a Source #

MonadProcess m => MonadProcess (IdentityT * m) Source # 

Methods

liftP :: Process a -> IdentityT * m a Source #

MonadProcess m => MonadProcess (StateT s m) Source # 

Methods

liftP :: Process a -> StateT s m a Source #

(Monoid w, MonadProcess m) => MonadProcess (WriterT w m) Source # 

Methods

liftP :: Process a -> WriterT w m a Source #

MonadProcess m => MonadProcess (ReaderT * r m) Source # 

Methods

liftP :: Process a -> ReaderT * r m a Source #

(Monoid w, MonadProcess m) => MonadProcess (RWST r w s m) Source # 

Methods

liftP :: Process a -> RWST r w s m a Source #

(Monoid w, MonadProcess m) => MonadProcess (RWST r w s m) Source # 

Methods

liftP :: Process a -> RWST r w s m a Source #

class MonadProcess m => MonadProcessBase m where Source #

A Clone of MonadBaseControl specialized to the Process monad. This uses the MonadTransControl typeclass for transformer default instances, so the core wrapping/unwrapping logic is not duplicated. This class is needed because the MonadBaseControl instance for Process has IO as the base.

Minimal complete definition

liftBaseWithP, restoreMP

Associated Types

type StMP m a :: * Source #

Methods

liftBaseWithP :: (RunInBaseP m -> Process a) -> m a Source #

restoreMP :: StMP m a -> m a Source #

Instances

MonadProcessBase Process Source # 

Associated Types

type StMP (Process :: * -> *) a :: * Source #

MonadProcessBase m => MonadProcessBase (ListT m) Source # 

Associated Types

type StMP (ListT m :: * -> *) a :: * Source #

Methods

liftBaseWithP :: (RunInBaseP (ListT m) -> Process a) -> ListT m a Source #

restoreMP :: StMP (ListT m) a -> ListT m a Source #

MonadProcessBase m => MonadProcessBase (MaybeT m) Source # 

Associated Types

type StMP (MaybeT m :: * -> *) a :: * Source #

Methods

liftBaseWithP :: (RunInBaseP (MaybeT m) -> Process a) -> MaybeT m a Source #

restoreMP :: StMP (MaybeT m) a -> MaybeT m a Source #

MonadProcessBase m => MonadProcessBase (ExceptT e m) Source # 

Associated Types

type StMP (ExceptT e m :: * -> *) a :: * Source #

Methods

liftBaseWithP :: (RunInBaseP (ExceptT e m) -> Process a) -> ExceptT e m a Source #

restoreMP :: StMP (ExceptT e m) a -> ExceptT e m a Source #

(Monoid w, MonadProcessBase m) => MonadProcessBase (WriterT w m) Source # 

Associated Types

type StMP (WriterT w m :: * -> *) a :: * Source #

Methods

liftBaseWithP :: (RunInBaseP (WriterT w m) -> Process a) -> WriterT w m a Source #

restoreMP :: StMP (WriterT w m) a -> WriterT w m a Source #

MonadProcessBase m => MonadProcessBase (StateT s m) Source # 

Associated Types

type StMP (StateT s m :: * -> *) a :: * Source #

Methods

liftBaseWithP :: (RunInBaseP (StateT s m) -> Process a) -> StateT s m a Source #

restoreMP :: StMP (StateT s m) a -> StateT s m a Source #

MonadProcessBase m => MonadProcessBase (IdentityT * m) Source # 

Associated Types

type StMP (IdentityT * m :: * -> *) a :: * Source #

MonadProcessBase m => MonadProcessBase (StateT s m) Source # 

Associated Types

type StMP (StateT s m :: * -> *) a :: * Source #

Methods

liftBaseWithP :: (RunInBaseP (StateT s m) -> Process a) -> StateT s m a Source #

restoreMP :: StMP (StateT s m) a -> StateT s m a Source #

(Monoid w, MonadProcessBase m) => MonadProcessBase (WriterT w m) Source # 

Associated Types

type StMP (WriterT w m :: * -> *) a :: * Source #

Methods

liftBaseWithP :: (RunInBaseP (WriterT w m) -> Process a) -> WriterT w m a Source #

restoreMP :: StMP (WriterT w m) a -> WriterT w m a Source #

MonadProcessBase m => MonadProcessBase (ReaderT * r m) Source # 

Associated Types

type StMP (ReaderT * r m :: * -> *) a :: * Source #

Methods

liftBaseWithP :: (RunInBaseP (ReaderT * r m) -> Process a) -> ReaderT * r m a Source #

restoreMP :: StMP (ReaderT * r m) a -> ReaderT * r m a Source #

(Monoid w, MonadProcessBase m) => MonadProcessBase (RWST r w s m) Source # 

Associated Types

type StMP (RWST r w s m :: * -> *) a :: * Source #

Methods

liftBaseWithP :: (RunInBaseP (RWST r w s m) -> Process a) -> RWST r w s m a Source #

restoreMP :: StMP (RWST r w s m) a -> RWST r w s m a Source #

(Monoid w, MonadProcessBase m) => MonadProcessBase (RWST r w s m) Source # 

Associated Types

type StMP (RWST r w s m :: * -> *) a :: * Source #

Methods

liftBaseWithP :: (RunInBaseP (RWST r w s m) -> Process a) -> RWST r w s m a Source #

restoreMP :: StMP (RWST r w s m) a -> RWST r w s m a Source #

type RunInBaseP m = forall a. m a -> Process (StMP m a) Source #

A clone of RunInBase for MonadProcessBase.

type ComposeStP t m a = StMP m (StT t a) Source #

A clone of ComposeSt for MonadProcessBase.

type RunInBaseDefaultP t m = forall a. t m a -> Process (ComposeStP t m a) Source #

A clone of RunInBaseDefault for MonadProcessBase.

defaultLiftBaseWithP :: (MonadTransControl t, MonadProcessBase m) => (RunInBaseDefaultP t m -> Process a) -> t m a Source #

A clone of defaultLiftBaseWith for MonadProcessBase. This re-uses the MonadTransControl typeclass the same way as the original; core wrapping/unwrapping logic for each transformer type is not duplicated.

defaultRestoreMP :: (MonadTransControl t, MonadProcessBase m) => ComposeStP t m a -> t m a Source #

A clone of defaultRestoreMP for MonadProcessBase. This re-uses the MonadTransControl typeclass the same way as the original; core wrapping/unwrapping logic for each transformer type is not duplicated.

controlP :: MonadProcessBase m => (RunInBaseP m -> Process (StMP m a)) -> m a Source #

A clone of control for MonadProcessBase.

liftBaseDiscardP :: MonadProcessBase m => (Process () -> Process a) -> m () -> m a Source #

A clone of liftBaseDiscard for MonadProcessBase.