continue-0.1.1: Continuation-based user interaction monad

MaintainerErtugrul Soeylemez <es@ertes.de>
Safe HaskellNone

Control.Continue.Utils

Contents

Description

Suspension/continuation utilities.

Synopsis

Basic utilities

addCont_ :: MonadContinue e f m => f (m ()) -> m ()Source

Add the given set of continuations without suspending.

continueSource

Arguments

:: MonadContinue e f m 
=> Either e a

What to return now (left suspends).

-> f (Either e a)

What to return when reentering (left suspends).

-> m a 

Allow to continue here with the given value.

continue_Source

Arguments

:: MonadContinue e f m 
=> f ()

Reentering key.

-> m () 

Allow to continue here.

suspend :: MonadContinue e f m => e -> m aSource

Suspend with the given value. Does not register any continuation spots. Note that suspend mempty is equivalent to empty.