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

Safe HaskellSafe-Inferred

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

MonadTrans ResT 
Monad m => Monad (ResT m) 
Monad m => Functor (ResT m) 
Monad m => Applicative (ResT m) 
MonadIO m => MonadIO (ResT m) 

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

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

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

Waits until the next tick.