pipes-2.5.0: Compositional pipelines

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