control-0.1.1.0: Class of monad transformers which control operations can be lifted thru

Safe HaskellSafe
LanguageHaskell2010

Control.Monad.Trans.Control

Documentation

class MonadTrans t => MonadTransControl t where Source #

Minimal complete definition

liftWith, restoreT

Associated Types

type StT t a Source #

Methods

liftWith :: Monad m => (Run t -> m a) -> t m a Source #

restoreT :: Monad m => m (StT t a) -> t m a Source #

Instances
MonadTransControl MaybeT Source # 
Instance details

Defined in Control.Monad.Trans.Control

Associated Types

type StT MaybeT a :: * Source #

Methods

liftWith :: Monad m => (Run MaybeT -> m a) -> MaybeT m a Source #

restoreT :: Monad m => m (StT MaybeT a) -> MaybeT m a Source #

Monoid w => MonadTransControl (WriterT w) Source # 
Instance details

Defined in Control.Monad.Trans.Control

Associated Types

type StT (WriterT w) a :: * Source #

Methods

liftWith :: Monad m => (Run (WriterT w) -> m a) -> WriterT w m a Source #

restoreT :: Monad m => m (StT (WriterT w) a) -> WriterT w m a Source #

Monoid c => MonadTransControl (AccumT c) Source # 
Instance details

Defined in Control.Monad.Trans.Control

Associated Types

type StT (AccumT c) a :: * Source #

Methods

liftWith :: Monad m => (Run (AccumT c) -> m a) -> AccumT c m a Source #

restoreT :: Monad m => m (StT (AccumT c) a) -> AccumT c m a Source #

Monoid w => MonadTransControl (WriterT w) Source # 
Instance details

Defined in Control.Monad.Trans.Control

Associated Types

type StT (WriterT w) a :: * Source #

Methods

liftWith :: Monad m => (Run (WriterT w) -> m a) -> WriterT w m a Source #

restoreT :: Monad m => m (StT (WriterT w) a) -> WriterT w m a Source #

MonadTransControl (StateT s) Source # 
Instance details

Defined in Control.Monad.Trans.Control

Associated Types

type StT (StateT s) a :: * Source #

Methods

liftWith :: Monad m => (Run (StateT s) -> m a) -> StateT s m a Source #

restoreT :: Monad m => m (StT (StateT s) a) -> StateT s m a Source #

MonadTransControl (StateT s) Source # 
Instance details

Defined in Control.Monad.Trans.Control

Associated Types

type StT (StateT s) a :: * Source #

Methods

liftWith :: Monad m => (Run (StateT s) -> m a) -> StateT s m a Source #

restoreT :: Monad m => m (StT (StateT s) a) -> StateT s m a Source #

MonadTransControl (IdentityT :: (* -> *) -> * -> *) Source # 
Instance details

Defined in Control.Monad.Trans.Control

Associated Types

type StT IdentityT a :: * Source #

Methods

liftWith :: Monad m => (Run IdentityT -> m a) -> IdentityT m a Source #

restoreT :: Monad m => m (StT IdentityT a) -> IdentityT m a Source #

MonadTransControl (ExceptT e) Source # 
Instance details

Defined in Control.Monad.Trans.Control

Associated Types

type StT (ExceptT e) a :: * Source #

Methods

liftWith :: Monad m => (Run (ExceptT e) -> m a) -> ExceptT e m a Source #

restoreT :: Monad m => m (StT (ExceptT e) a) -> ExceptT e m a Source #

MonadTransControl (ReaderT r :: (* -> *) -> * -> *) Source # 
Instance details

Defined in Control.Monad.Trans.Control

Associated Types

type StT (ReaderT r) a :: * Source #

Methods

liftWith :: Monad m => (Run (ReaderT r) -> m a) -> ReaderT r m a Source #

restoreT :: Monad m => m (StT (ReaderT r) a) -> ReaderT r m a Source #

type Run t = forall n b. Monad n => t n b -> n (StT t b) Source #