Safe Haskell | Safe |
---|---|
Language | Haskell2010 |
Synopsis
- newtype Identity a = Identity {
- runIdentity :: a
- generalize :: Monad m => Identity a -> m a
- newtype IdentityT (f :: k -> *) (a :: k) :: forall k. (k -> *) -> k -> * = IdentityT {
- runIdentityT :: f a
- mapIdentityT :: (m a -> n b) -> IdentityT m a -> IdentityT n b
Identity
Identity functor and monad. (a non-strict monad)
Since: base-4.8.0.0
Identity | |
|
Instances
generalize :: Monad m => Identity a -> m a #
A function that generalize
s the Identity
base monad to be any monad.
IdentityT
newtype IdentityT (f :: k -> *) (a :: k) :: forall k. (k -> *) -> k -> * #
The trivial monad transformer, which maps a monad to an equivalent monad.
IdentityT | |
|
Instances
mapIdentityT :: (m a -> n b) -> IdentityT m a -> IdentityT n b #
Lift a unary operation to the new monad.