jon.recoil.org

Module Named_rewrite.Prim_rewrite

type t = private
  1. | Remove_prim
  2. | Invalid of Flambda2_kinds.Flambda_kind.t
  3. | Replace_by_binding of {
    1. var : Flambda2_identifiers.Variable.t;
    2. bound_to : Flambda2_term_basics.Simple.t;
    }

Rewrite for primitives

val print : Format.formatter -> t -> unit

Replace the primitive by the Invalid primitive.

val remove_prim : t

Remove the primitve (and its binding)

val replace_by_binding : var:Flambda2_identifiers.Variable.t -> bound_to:Flambda2_term_basics.Simple.t -> t

Replace the primitive by the given Simple.t