define-resumption declares a resumable control signal that can be handled by
resumable.
Syntax
(define-resumption ⟨constructor⟩)
(define-resumption (⟨constructor⟩ ⟨arg-type⟩ ...)
⟨docstring⟩)
Semantics
define-resumptionis a toplevel definition form.- A resumption has exactly one constructor, which also determines the resumption type’s name.
- Unlike exceptions, resumptions are intended to transfer control to an
enclosing
resumablehandler viaresume-to. - Every resumption type is an instance of the
Resumptionclass, whichresume-torequires. Instances ofResumptioncannot be written manually, and a resumption type cannot be redefined as a type that is not a resumption. - Optional docstrings are allowed.
Example
(define-resumption (ServeRaw Egg)
"Suggest that the egg be served raw.")