machines-0.2.4: Networked stream transducers

PortabilityRank-2 Types
MaintainerEdward Kmett <>
Safe HaskellSafe-Inferred







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