Portability | portable |
---|---|
Stability | experimental |
Maintainer | ross@soi.city.ac.uk |
Safe Haskell | Safe-Inferred |
The identity functor and monad.
This trivial type constructor serves two purposes:
- It can be used with functions parameterized by a
Functor
orMonad
. - It can be used as a base monad to which a series of monad
transformers may be applied to construct a composite monad.
Most monad transformer modules include the special case of
applying the transformer to
Identity
. For example,State s
is an abbreviation forStateT s
.Identity
- newtype Identity a = Identity {
- runIdentity :: a