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 | Haskell2010 |
The identity monad transformer.
This is useful for functions parameterized by a monad transformer.
Synopsis
- newtype IdentityT (f :: k -> Type) (a :: k) = IdentityT {
- runIdentityT :: f a
- mapIdentityT :: forall {k1} {k2} m (a :: k1) n (b :: k2). (m a -> n b) -> IdentityT m a -> IdentityT n b
- liftCatch :: forall {k} e m (a :: k). 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 :: k -> Type) (a :: k) Source #
The trivial monad transformer, which maps a monad to an equivalent monad.
IdentityT | |
|
Instances
mapIdentityT :: forall {k1} {k2} m (a :: k1) n (b :: k2). (m a -> n b) -> IdentityT m a -> IdentityT n b Source #
Lift a unary operation to the new monad.