pipes-2.5.0: Compositional pipelines

Safe HaskellSafe-Inferred

Control.Proxy.Trans.Reader

Contents

Description

This module provides the proxy transformer equivalent of ReaderT.

Synopsis

ReaderP

newtype ReaderP i p a' a b' b m r Source

The Reader proxy transformer

Constructors

ReaderP 

Fields

unReaderP :: i -> p a' a b' b m r
 

Instances

ProxyTrans (ReaderP i) 
Interact p => Interact (ReaderP i p) 
Channel p => Channel (ReaderP i p) 
MonadTrans (p a' a b' b) => MonadTrans (ReaderP i p a' a b' b) 
MFunctor (p a' a b' b) => MFunctor (ReaderP i p a' a b' b) 
Monad (p a' a b' b m) => Monad (ReaderP i p a' a b' b m) 
Monad (p a' a b' b m) => Functor (ReaderP i p a' a b' b m) 
(Monad (ReaderP i p a' a b' b m), MonadPlus (p a' a b' b m)) => MonadPlus (ReaderP i p a' a b' b m) 
(Functor (ReaderP i p a' a b' b m), Monad (p a' a b' b m)) => Applicative (ReaderP i p a' a b' b m) 
(Applicative (ReaderP i p a' a b' b m), MonadPlus (p a' a b' b m)) => Alternative (ReaderP i p a' a b' b m) 
(Monad (ReaderP i p a' a b' b m), MonadIO (p a' a b' b m)) => MonadIO (ReaderP i p a' a b' b m) 

runReaderP :: i -> ReaderP i p a' a b' b m r -> p a' a b' b m rSource

Run a ReaderP computation, supplying the environment

runReaderK :: i -> (q -> ReaderP i p a' a b' b m r) -> q -> p a' a b' b m rSource

Run a ReaderP 'K'leisli arrow, supplying the environment

withReaderP :: Monad (p a' a b' b m) => (j -> i) -> ReaderP i p a' a b' b m r -> ReaderP j p a' a b' b m rSource

Modify a computation's environment (a more general version of local)

Reader operations

ask :: Monad (p a' a b' b m) => ReaderP i p a' a b' b m iSource

Get the environment

local :: Monad (p a' a b' b m) => (i -> i) -> ReaderP i p a' a b' b m r -> ReaderP i p a' a b' b m rSource

Modify a computation's environment (a specialization of withReaderP)

asks :: Monad (p a' a b' b m) => (i -> r) -> ReaderP i p a' a b' b m rSource

Get a function of the environment