jon.recoil.org

Module Flambda.Let_cont_expr

Values of type t represent alpha-equivalence classes of the definitions of continuations:

let_cont name args = handler in body

or using an alternative notation:

body where name args = handler

(In the -drawflambda / -dflambda output, "where" is omitted, in favour of a simple label syntax e.g. "k42:")

It is an error to mark a continuation that might be recursive as non-recursive. The converse is safe.

Note: any continuation used as an exception handler must be non-recursive by the point it reaches Flambda_to_cmm. (This means that it is permissible to introduce mutual recursion through stubs associated with such continuations, so long as Simplify is run afterwards to inline them out and turn the resulting single Recursive handler into a Non_recursive one.

Create a definition of a non-recursive continuation. If the continuation does not occur free in the body, then just the body is returned, without any enclosing Let_cont.

Create a definition of a set of possibly-recursive continuations.