monad-resumption-0.1.1.4: Resumption and reactive resumption monads for Haskell.

Safe HaskellSafe-Inferred
LanguageHaskell2010

Control.Monad.Resumption

Description

A resumption monad transformer, based on the formulation in the article Cheap (But Functional) Threads by William L. Harrison and Adam Procter.

Synopsis

Documentation

newtype ResT m a Source

Resumption monad transformer.

Constructors

ResT 

Fields

deResT :: m (Either a (ResT m a))
 

Instances

runResT :: Monad m => ResT m a -> m a Source

Runs a resumptive computation to exhaustion, producing its final return value.

tick :: Monad m => ResT m () Source

Waits until the next tick.