jon.recoil.org

Module Flambda2_simplify.Simplified_named

Unlike Named.t, this type does not include Static_consts because such constants are propagated separately after simplification.

type t = private {
  1. named : simplified_named;
  2. cost_metrics : Flambda2_terms.Cost_metrics.t;
  3. free_names : Flambda2_nominal.Name_occurrences.t;
}

It is an error to pass Set_of_closures or Static_consts to this function. (Sets of closures are disallowed because computation of their free names might be expensive; use reachable_with_known_free_names instead.)

It is an error to pass Static_consts to this function.

val print : Format.formatter -> t -> unit
val cost_metrics : t -> Flambda2_terms.Cost_metrics.t
val update_cost_metrics : Flambda2_terms.Cost_metrics.t -> t -> t
type 'a or_rewritten =
  1. | Simplified of 'a
  2. | Rewritten of body:Flambda2_terms.Flambda.Expr.t -> Flambda2_terms.Flambda.Expr.t