Legend:
Page
Library
Module
Module type
Parameter
Class
Class type
Source
Page
Library
Module
Module type
Parameter
Class
Class type
Source
Modifier.SSourceThe signature of the engine.
include ParamThe type of data held by the bindings. The difference between data and tags is that the data will survive the efficient retagging. See Trie.retag.
The type of tags attached to the bindings. The difference between data and tags is that tags can be efficiently reset. See Trie.retag.
The type of contexts passed to each call of Modifier.S.modify for the effect handler to distinguish different function calls.
val modify :
?context:context ->
?prefix:Trie.bwd_path ->
hook Language.t ->
(data, tag) Trie.t ->
(data, tag) Trie.tmodify modifier trie runs the modifier on the trie and return the transformed trie.
run f h initializes the engine and runs the thunk f, using h to handle modifier effects. See handler.
try_with f h runs the thunk f, using h to handle the intercepted modifier effects. See handler.
Currently, try_with is an alias of run, but try_with is intended to use within run to intercept effects, while run is intended to be at the outermost layer to handle effects. That is, the following is the expected program structure:
run @@ fun () ->
(* code *)
try_with f { ... }
(* more code *)