Portability | non-portable |
---|---|
Stability | experimental |
Maintainer | alexey.skladnoy@gmail.com |
Safe Haskell | None |
- class (PrimMonad (BasePrimMonad m), Monad m) => MonadPrim m where
- type BasePrimMonad m :: * -> *
- liftPrim :: BasePrimMonad m a -> m a
Documentation
class (PrimMonad (BasePrimMonad m), Monad m) => MonadPrim m whereSource
Monads in which computation based on primitive monad (instance of
PrimMonad
) could be embedded. Instances must obey following laws:
liftPrim . return = return liftPrim (m >>= f) = liftPrim m >>= liftPrim f
type BasePrimMonad m :: * -> *Source
liftPrim :: BasePrimMonad m a -> m aSource
MonadPrim IO | |
MonadPrim (ST s) | |
MonadPrim m => MonadPrim (MaybeT m) | |
MonadPrim m => MonadPrim (IdentityT m) | |
(MonadPrim m, Monoid w) => MonadPrim (WriterT w m) | |
(MonadPrim m, Monoid w) => MonadPrim (WriterT w m) | |
MonadPrim m => MonadPrim (StateT s m) | |
MonadPrim m => MonadPrim (StateT s m) | |
MonadPrim m => MonadPrim (ReaderT r m) | |
(MonadPrim m, Error e) => MonadPrim (ErrorT e m) | |
MonadPrim m => MonadPrim (ContT r m) | |
(MonadPrim m, Monoid w) => MonadPrim (RWST r w s m) | |
(MonadPrim m, Monoid w) => MonadPrim (RWST r w s m) |