-- Hoogle documentation, generated by Haddock
-- See Hoogle, http://www.haskell.org/hoogle/
-- | Horizontally composable effects
--
-- This library provides for the horizontal composition of effects,
-- serving as an alternative to the monad transformers stacking
-- composition. It is expected to be faster, but no comparison has been
-- performed yet.
@package fx
@version 0.10.1
module Fx.EitherEffect
-- | A sum of two effects. Allows for horizontal composition of monads
-- instead of nesting as with monad transformers.
--
-- To execute it use eitherEffect.
data EitherEffect leftEffect rightEffect context result
-- | Lift the first of the two effects.
liftLeft :: left result -> EitherEffect left right either result
-- | Lift the second of the two effects.
liftRight :: right result -> EitherEffect left right either result
instance GHC.Base.Functor either => GHC.Base.Functor (Fx.EitherEffect.Types.EitherEffect left right either)
instance GHC.Base.Applicative either => GHC.Base.Applicative (Fx.EitherEffect.Types.EitherEffect left right either)
instance GHC.Base.Monad either => GHC.Base.Monad (Fx.EitherEffect.Types.EitherEffect left right either)
instance Control.Monad.IO.Class.MonadIO either => Control.Monad.IO.Class.MonadIO (Fx.EitherEffect.Types.EitherEffect left right either)
module Fx.Transform
-- | Natural transformation. An abstraction over the transformation of
-- kind-2 input to output, both producing the same
-- result.
newtype input (-->) output
Transform :: (forall result. input result -> output result) -> (-->) input output
-- | Given a natural transformation of the left monad and a natural
-- transformation of the right monad, produces a natural transformation
-- of either of them.
eitherEffect :: Monad either => (left --> either) -> (right --> either) -> (EitherEffect left right either --> either)
instance Control.Category.Category (Fx.Transform.-->)