machines-0.1.2: Networked stream transducers

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

Data.Machine.Source

Contents

Description

 

Synopsis

Sources

type Source b = forall k a. Machine k a bSource

A Source never reads from its inputs.

type SourceT m b = forall k a. MachineT m k a bSource

A SourceT never reads from its inputs, but may have monadic side-effects.

source :: Foldable f => f b -> Source bSource

Generate a Source from any Foldable container.

repeated :: o -> Source oSource

Repeat the same value, over and over.

cycled :: Foldable f => f b -> Source bSource

Loop through a Foldable container over and over.

cap :: Process a b -> Source a -> Source bSource

You can transform a Source with a Process.

Alternately you can view this as capping the Source end of a Process, yielding a new Source.

cap = pipe