machinecell-1.3.1: Arrow based stream transducers

Safe HaskellNone
LanguageHaskell2010

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 a Source

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

await :: Plan i o i Source

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

stop :: Plan i o a Source

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