|Portability||Non-portable (rank-2 types, generalized algebraic datatypes)|
A monadic treatment of delimited continuations.
Adapted from the paper A Monadic Framework for Delimited Continuations, by R. Kent Dybvig, Simon Peyton Jones and Amr Sabry (http://www.cs.indiana.edu/~sabry/papers/monadicDC.pdf)
This module implements the generation of unique prompt names to be used as delimiters.
P, The prompt generation monad
The prompt generation monad. Represents the type of computations that make use of a supply of unique prompts.
The Prompt type
The prompt type, parameterized by two types: * ans : The region identifier, used to ensure that prompts are only used within the same context in which they are created.
- a : The type of values that may be returned
througha given prompt. For instance, only prompts of type 'Prompt r a' may be pushed onto a computation of type 'CC r a'.
Runs a computation that makes use of prompts, yielding a result in the underlying monad.
Tests to determine if two prompts are equal. If so, it provides evidence of that fact, in the form of an Equal.