Safe Haskell | Safe-Inferred |
---|

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.

# Proxy Transformers

class ProxyTrans t whereSource

`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.

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

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 rSource

ProxyTrans IdentityP | |

ProxyTrans MaybeP | |

ProxyTrans (EitherP e) | |

ProxyTrans (ReaderP i) | |

ProxyTrans (StateP s) | |

Monoid w => ProxyTrans (WriterP w) |