machines-0.1.2: Networked stream transducers

PortabilityRank-2 Types, GADTs
Stabilityprovisional
MaintainerEdward Kmett <ekmett@gmail.com>
Safe HaskellNone

Data.Machine.Tee

Contents

Description

 

Synopsis

Tees

type Tee a b c = Machine T (a, b) cSource

A Machine that can read from two input stream in a deterministic manner.

type TeeT m a b c = MachineT m T (a, b) cSource

A Machine that can read from two input stream in a deterministic manner with monadic side-effects.

data T i c whereSource

The input descriptor for a Tee or TeeT

Constructors

L :: T (a, b) a 
R :: T (a, b) b 

tee :: Monad m => ProcessT m a a' -> ProcessT m b b' -> TeeT m a' b' c -> TeeT m a b cSource

Compose a pair of pipes onto the front of a Tee.

addL :: Monad m => ProcessT m a b -> TeeT m b c d -> TeeT m a c dSource

Precompose a pipe onto the left input of a tee.

addR :: Monad m => ProcessT m b c -> TeeT m a c d -> TeeT m a b dSource

Precompose a pipe onto the right input of a tee.

capL :: Monad m => SourceT m a -> TeeT m a b c -> ProcessT m b cSource

Tie off one input of a tee by connecting it to a known source.

capR :: Monad m => SourceT m b -> TeeT m a b c -> ProcessT m a cSource

Tie off one input of a tee by connecting it to a known source.