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
The trivial monad transformer, which maps a monad to an equivalent monad.
IdentityT | |
|
MonadTrans (IdentityT (TYPE Lifted)) | |
Monad m => Monad (IdentityT (TYPE Lifted) m) | |
Functor m => Functor (IdentityT (TYPE Lifted) m) | |
MonadFix m => MonadFix (IdentityT (TYPE Lifted) m) | |
MonadFail m => MonadFail (IdentityT (TYPE Lifted) m) | |
Applicative m => Applicative (IdentityT (TYPE Lifted) m) | |
Foldable f => Foldable (IdentityT (TYPE Lifted) f) | |
Traversable f => Traversable (IdentityT (TYPE Lifted) f) | |
Eq1 f => Eq1 (IdentityT (TYPE Lifted) f) | |
Ord1 f => Ord1 (IdentityT (TYPE Lifted) f) | |
Read1 f => Read1 (IdentityT (TYPE Lifted) f) | |
Show1 f => Show1 (IdentityT (TYPE Lifted) f) | |
MonadIO m => MonadIO (IdentityT (TYPE Lifted) m) | |
MonadZip m => MonadZip (IdentityT (TYPE Lifted) m) | |
Alternative m => Alternative (IdentityT (TYPE Lifted) m) | |
MonadPlus m => MonadPlus (IdentityT (TYPE Lifted) m) | |
(Eq1 f, Eq a) => Eq (IdentityT (TYPE Lifted) f a) | |
(Ord1 f, Ord a) => Ord (IdentityT (TYPE Lifted) f a) | |
(Read1 f, Read a) => Read (IdentityT (TYPE Lifted) f a) | |
(Show1 f, Show a) => Show (IdentityT (TYPE Lifted) f a) | |
mapIdentityT :: (m a -> n b) -> IdentityT m a -> IdentityT n b Source
Lift a unary operation to the new monad.
Lifting other operations
liftCallCC :: CallCC m a b -> CallCC (IdentityT m) a b Source
Lift a callCC
operation to the new monad.