jon.recoil.org

Module Flambda2_simplify.Continuation_in_env

type t =
  1. | Linearly_used_and_inlinable of {
    1. params : Flambda2_bound_identifiers.Bound_parameters.t;
      (*

      To avoid re-opening name abstractions, we store the opened parameters and handler here.

      *)
    2. handler : Flambda2_simplify.Rebuilt_expr.t;
      (*

      free_names_of_handler includes entries for any occurrences of the params in the handler.

      *)
    3. free_names_of_handler : Flambda2_nominal.Name_occurrences.t;
    4. cost_metrics_of_handler : Flambda2_terms.Cost_metrics.t;
    }
  2. | Non_inlinable_zero_arity of {
    1. handler : Flambda2_simplify.Rebuilt_expr.t Flambda2_lattices.Or_unknown.t;
      (*

      The handler, if available, is stored for Simplify_switch_expr.

      *)
    }
  3. | Non_inlinable_non_zero_arity of {
    1. arity : [ `Unarized ] Flambda2_kinds.Flambda_arity.t;
    }
  4. | Toplevel_or_function_return_or_exn_continuation of {
    1. arity : [ `Unarized ] Flambda2_kinds.Flambda_arity.t;
    }
  5. | Invalid of {
    1. arity : [ `Unarized ] Flambda2_kinds.Flambda_arity.t;
    }
    (*

    Invalid means that the code of the continuation handler is invalid, not that the continuation has zero uses.

    *)