Copyright | (c) 2007 Magnus Therning |
---|---|
License | BSD-style (see the file LICENSE) |
Maintainer | R.Paterson@city.ac.uk |
Stability | experimental |
Portability | portable |
Safe Haskell | Safe |
Language | Haskell98 |
The identity monad transformer.
This is useful for functions parameterized by a monad transformer.
- newtype IdentityT f a = IdentityT {
- runIdentityT :: f a
- mapIdentityT :: (m a -> n b) -> IdentityT m a -> IdentityT n b
- liftCatch :: Catch e m a -> Catch e (IdentityT m) a
- liftCallCC :: CallCC m a b -> CallCC (IdentityT m) a b
The identity monad transformer
newtype IdentityT f a Source #
The trivial monad transformer, which maps a monad to an equivalent monad.
IdentityT | |
|
MonadTrans (IdentityT *) Source # | |
Monad m => Monad (IdentityT * m) Source # | |
Functor m => Functor (IdentityT * m) Source # | |
MonadFix m => MonadFix (IdentityT * m) Source # | |
MonadFail m => MonadFail (IdentityT * m) Source # | |
Applicative m => Applicative (IdentityT * m) Source # | |
Foldable f => Foldable (IdentityT * f) Source # | |
Traversable f => Traversable (IdentityT * f) Source # | |
Eq1 f => Eq1 (IdentityT * f) Source # | |
Ord1 f => Ord1 (IdentityT * f) Source # | |
Read1 f => Read1 (IdentityT * f) Source # | |
Show1 f => Show1 (IdentityT * f) Source # | |
MonadZip m => MonadZip (IdentityT * m) Source # | |
MonadIO m => MonadIO (IdentityT * m) Source # | |
Alternative m => Alternative (IdentityT * m) Source # | |
MonadPlus m => MonadPlus (IdentityT * m) Source # | |
(Eq1 f, Eq a) => Eq (IdentityT * f a) Source # | |
(Ord1 f, Ord a) => Ord (IdentityT * f a) Source # | |
(Read1 f, Read a) => Read (IdentityT * f a) Source # | |
(Show1 f, Show a) => Show (IdentityT * f a) Source # | |
mapIdentityT :: (m a -> n b) -> IdentityT m a -> IdentityT n b Source #
Lift a unary operation to the new monad.