jon.recoil.org

Module Flambda2_simplify.Apply_cont_rewrite

Rewrites applied to Apply_cont expressions in order to reflect changes in continuation arities consequential to addition or removal of parameters.

The rewrites are actually applied via Expr_builder.

type t
type used =
  1. | Unused
  2. | Used
  3. | Used_as_invariant
val print : Format.formatter -> t -> unit
val create : original_params:Flambda2_bound_identifiers.Bound_parameters.t -> extra_params_and_args:Continuation_extra_params_and_args.t -> decide_param_usage:(Flambda2_bound_identifiers.Bound_parameter.t -> used) -> t

extra_args (and hence extra_params) must be given in order: later extra-args may refer to earlier extra-args, but not vice-versa.

val does_nothing : t -> bool
val original_params_arity : t -> [> ] Flambda2_kinds.Flambda_arity.t
type rewrite_apply_cont_ctx =
  1. | Apply_cont
  2. | Apply_expr of Flambda2_term_basics.Simple.t list