distributed-process-lifted-0.1.0.0: 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.

Methods

liftP :: Process a -> m a Source

lift a base Process computation into the current monad

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.

Associated Types

type StMP m a :: * Source

Methods

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

restoreMP :: StMP m a -> 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.