Delimcc primitives from OCaml 5 effect handlers. See lib/delimcc_of_fxhandler.mli.
You can install the library for OCaml 5 as follows:
$ opam install delimcc_of_fxhandler
There is a test in tests/
, which can be run as follows:
$ dune exec ./test/test1.exe
Delimited control operators such as shift/reset and control/prompt are presented
in a setting where the continuations may be resumed more than once whereas OCaml
5 delimited continuations may not be resumed more than once. To support
multi-shot continuations, this library uses
ocaml-multicont. Hence, the same
caveats
that applies to ocaml-multicont
applies to this library.