Module Flambda.Continuation_handler
The alpha-equivalence class of the binding of a list of parameters around an expression, forming a continuation handler, together with auxiliary information about such handler.
val print :
cont:Flambda2_identifiers.Continuation.t ->
recursive:Flambda2_terms.Recursive.t ->
Stdlib.Format.formatter ->
Flambda2_terms.Flambda.Continuation_handler.t ->
unitval create :
Flambda2_bound_identifiers.Bound_parameters.t ->
handler:Flambda2_terms.Flambda.expr ->
free_names_of_handler:
Flambda2_nominal.Name_occurrences.t Flambda2_lattices.Or_unknown.t ->
is_exn_handler:bool ->
is_cold:bool ->
Flambda2_terms.Flambda.Continuation_handler.tCreate the representation of a single continuation handler.
val pattern_match' :
Flambda2_terms.Flambda.Continuation_handler.t ->
f:
(Flambda2_bound_identifiers.Bound_parameters.t ->
num_normal_occurrences_of_params:
Flambda2_nominal.Num_occurrences.t Flambda2_identifiers.Variable.Map.t ->
handler:Flambda2_terms.Flambda.expr ->
'a) ->
'aChoose a member of the alpha-equivalence class to enable examination of the parameters and the code over which they are scoped.
val pattern_match :
Flambda2_terms.Flambda.Continuation_handler.t ->
f:
(Flambda2_bound_identifiers.Bound_parameters.t ->
handler:Flambda2_terms.Flambda.expr ->
'a) ->
'amodule Pattern_match_pair_error : sig ... endval pattern_match_pair :
Flambda2_terms.Flambda.Continuation_handler.t ->
Flambda2_terms.Flambda.Continuation_handler.t ->
f:
(Flambda2_bound_identifiers.Bound_parameters.t ->
handler1:Flambda2_terms.Flambda.expr ->
handler2:Flambda2_terms.Flambda.expr ->
'a) ->
('a, Flambda2_terms.Flambda.Continuation_handler.Pattern_match_pair_error.t)
Stdlib.Result.tChoose members of two bindings' alpha-equivalence classes using the same parameters.
val is_exn_handler : Flambda2_terms.Flambda.Continuation_handler.t -> boolWhether the continuation is an exception handler.
Continuations used as exception handlers are always Non_recursive. To enable identification of them in passes not invoked from Simplify (where they could be identified by looking at the Apply_conts that reference them) they are marked explicitly.
Continuations used as exception handlers may have more than one parameter (see Exn_continuation).
(Relevant piece of background info: the backend cannot compile simultaneously-defined continuations when one or more of them is an exception handler.)
val is_cold : Flambda2_terms.Flambda.Continuation_handler.t -> bool