machinecell-1.2.0: Arrow based stream transducers

Safe HaskellNone

Control.Arrow.Machine.Plan

Contents

Description

A coroutine monad, inspired by machines library.

Synopsis

Types and Primitives

type PlanT i o m a = FT (PlanF i o) m aSource

type Plan i o a = forall m. Monad m => PlanT i o m aSource

await :: Plan i o iSource

yield :: o -> Plan i o ()Source

stop :: Plan i o aSource

Constructing machines

constructT :: (Monad m, ArrowApply a) => (forall b. m b -> a () b) -> PlanT i o m r -> ProcessA a (Event i) (Event o)Source

repeatedlyT :: (Monad m, ArrowApply a) => (forall b. m b -> a () b) -> PlanT i o m r -> ProcessA a (Event i) (Event o)Source

construct :: ArrowApply a => Plan i o t -> ProcessA a (Event i) (Event o)Source

repeatedly :: ArrowApply a => Plan i o t -> ProcessA a (Event i) (Event o)Source