pipes-2.4.0: Compositional pipelines

Safe Haskell Safe Haskell2010

Control.Proxy.Trans

Contents

Description

You can define your own extensions to the Proxy type by writing your own "proxy transformers". Proxy transformers are monad transformers that correctly lift Proxy composition from the base monad. Stack multiple proxy transformers to chain features together.

Synopsis

Proxy Transformers

class ProxyTrans t where Source #

mapP defines a functor that preserves Proxy composition and Kleisli composition.

Laws:

• Functor between Proxy categories
mapP (f <-< g) = mapP f <-< mapP g
mapP idT = idT
• Functor between Kleisli categories
mapP (f <=< g) = mapP f <=< mapP g
mapP return = return

Minimal complete definition: mapP or liftP. Defining liftP is more efficient.

Methods

liftP :: (Monad (p b c d e m), Channel p) => p b c d e m r -> t p b c d e m r Source #

mapP :: (Monad (p b c d e m), Channel p) => (a -> p b c d e m r) -> a -> t p b c d e m r Source #

Instances

 Source # MethodsliftP :: (Monad (p b c d e m), Channel p) => p b c d e m r -> IdentityP p b c d e m r Source #mapP :: (Monad (p b c d e m), Channel p) => (a -> p b c d e m r) -> a -> IdentityP p b c d e m r Source # Source # MethodsliftP :: (Monad (p b c d e m), Channel p) => p b c d e m r -> MaybeP p b c d e m r Source #mapP :: (Monad (p b c d e m), Channel p) => (a -> p b c d e m r) -> a -> MaybeP p b c d e m r Source # Source # MethodsliftP :: (Monad (p b c d e m), Channel p) => p b c d e m r -> EitherP e p b c d e m r Source #mapP :: (Monad (p b c d e m), Channel p) => (a -> p b c d e m r) -> a -> EitherP e p b c d e m r Source # Source # MethodsliftP :: (Monad (p b c d e m), Channel p) => p b c d e m r -> ReaderP i p b c d e m r Source #mapP :: (Monad (p b c d e m), Channel p) => (a -> p b c d e m r) -> a -> ReaderP i p b c d e m r Source # Source # MethodsliftP :: (Monad (p b c d e m), Channel p) => p b c d e m r -> StateP s p b c d e m r Source #mapP :: (Monad (p b c d e m), Channel p) => (a -> p b c d e m r) -> a -> StateP s p b c d e m r Source # Monoid w => ProxyTrans (WriterP w) Source # MethodsliftP :: (Monad (p b c d e m), Channel p) => p b c d e m r -> WriterP w p b c d e m r Source #mapP :: (Monad (p b c d e m), Channel p) => (a -> p b c d e m r) -> a -> WriterP w p b c d e m r Source #