Safe Haskell | None |
---|---|
Language | Haskell2010 |
A coroutine monad, inspired by machines library.
- type PlanT i o m a = FT (PlanF i o) m a
- type Plan i o a = forall m. Monad m => PlanT i o m a
- await :: Plan i o i
- yield :: o -> Plan i o ()
- stop :: Plan i o a
- stopped :: (ArrowApply a, Occasional c) => ProcessA a b c
- constructT :: (Monad m, ArrowApply a) => (forall b. m b -> a () b) -> PlanT i o m r -> ProcessA a (Event i) (Event o)
- repeatedlyT :: (Monad m, ArrowApply a) => (forall b. m b -> a () b) -> PlanT i o m r -> ProcessA a (Event i) (Event o)
- construct :: ArrowApply a => Plan i o t -> ProcessA a (Event i) (Event o)
- repeatedly :: ArrowApply a => Plan i o t -> ProcessA a (Event i) (Event o)
Types and Primitives
stopped :: (ArrowApply a, Occasional c) => ProcessA a b c 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
repeatedly :: ArrowApply a => Plan i o t -> ProcessA a (Event i) (Event o) Source