Safe Haskell | None |
---|---|
Language | Haskell2010 |
- newtype input --> output = Transform (forall result. input result -> output result)
- eitherEffect :: Monad either => (left --> either) -> (right --> either) -> EitherEffect left right either --> either
Documentation
newtype input --> output Source #
Natural transformation.
An abstraction over the transformation of kind-2 input
to output
, both producing the same result
.
Transform (forall result. input result -> output result) |
eitherEffect :: Monad either => (left --> either) -> (right --> either) -> EitherEffect left right either --> either Source #
Given a natural transformation of the left monad and a natural transformation of the right monad, produces a natural transformation of either of them.