machines-0.2.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. Machine k bSource

A Source never reads from its inputs.

type SourceT m b = forall k. MachineT m k 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  l r = l <~  r

AltStyle によって変換されたページ (->オリジナル) /