fx-0.10: Horizontally composable effects

Safe HaskellNone
LanguageHaskell2010

Fx.Transform

Synopsis

Documentation

newtype input --> output Source #

Natural transformation. An abstraction over the transformation of kind-2 input to output, both producing the same result.

Constructors

Transform (forall result. input result -> output result) 

Instances

Category (* -> *) (-->) Source # 

Methods

id :: cat a a #

(.) :: cat b c -> cat a b -> cat a c #

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.