freer-0.2.2.6: Implementation of the Freer Monad

CopyrightAlej Cabrera 2015
LicenseBSD-3
Maintainercpp.cabrera@gmail.com
Stabilitybroken
PortabilityPOSIX
Safe HaskellNone
LanguageHaskell2010

Control.Monad.Freer.Coroutine

Description

An effect to compose functions with the ability to yield.

Using http://okmij.org/ftp/Haskell/extensible/Eff1.hs as a starting point.

Synopsis

Documentation

data Yield a b v Source

A type representing a yielding of control a: The current type b: The input to the continuation function v: The output of the continuation

Instances

yield :: Member (Yield a b) r => a -> (b -> c) -> Eff r c Source

Lifts a value and a function into the Coroutine effect

data Status r a b Source

Status of a thread: done or reporting the value of the type a and resuming with the value of type b

Constructors

Done 
Continue a (b -> Eff r (Status r a b)) 

runC :: Eff (Yield a b : r) w -> Eff r (Status r a b) Source

Launch a thread and report its status