transformers-base-0.4.4: Lift computations from the bottom of a transformer stack

Safe Haskell | Safe
Language | Haskell98

Control.Monad.Base

Synopsis

- class (Applicative b, Applicative m, Monad b, Monad m) => MonadBase b m | m -> b where
  - liftBase :: b α -> m α
- liftBaseDefault :: (MonadTrans t, MonadBase b m) => b α -> t m α

# Documentation

class (Applicative b, Applicative m, Monad b, Monad m) => MonadBase b m | m -> b where

Methods

liftBase :: b α -> m α

Lift a computation from the base monad

Instances

MonadBase [] [] |
MonadBase IO IO |
MonadBase Identity Identity |
MonadBase STM STM |
MonadBase Maybe Maybe |
MonadBase b m => MonadBase b (ListT m) |
MonadBase b m => MonadBase b (MaybeT m) |
MonadBase b m => MonadBase b (IdentityT m) |
(Error e, MonadBase b m) => MonadBase b (ErrorT e m) |
(Monoid w, MonadBase b m) => MonadBase b (WriterT w m) |
(Monoid w, MonadBase b m) => MonadBase b (WriterT w m) |
MonadBase b m => MonadBase b (ExceptT e m) |
MonadBase b m => MonadBase b (ContT r m) |
MonadBase b m => MonadBase b (StateT s m) |
MonadBase b m => MonadBase b (StateT s m) |
MonadBase b m => MonadBase b (ReaderT r m) |
(Monoid w, MonadBase b m) => MonadBase b (RWST r w s m) |
(Monoid w, MonadBase b m) => MonadBase b (RWST r w s m) |
MonadBase ((->) r) ((->) r) |
MonadBase (Either e) (Either e) |
MonadBase (ST s) (ST s) |
MonadBase (ST s) (ST s) |

liftBaseDefault :: (MonadTrans t, MonadBase b m) => b α -> t m α

Can be used as a default implementation for `liftBase`.

Note that: `liftBaseDefault = `lift` . `liftBase``