machinecell-1.0.1: 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 = FreeT (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 ()Source

stopped :: (ArrowApply a, Occasional c) => ProcessA a b cSource

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