jon.recoil.org

Module Flambda2_terms.Code_or_metadata

type t
type raw
module View : sig ... end
val view : t -> View.t
val get_code : t -> Code.t

Will return the code or cause a fatal error.

val print : Format.formatter -> t -> unit
val print_view : Format.formatter -> t -> unit
val merge : Flambda2_identifiers.Code_id.t -> t -> t -> t
val create : Code.t -> t
val create_metadata_only : Code_metadata.t -> t
val from_raw : sections:Oxcaml_utils.File_sections.t -> raw -> t
val to_raw : add_section:(Obj.t -> int) -> t -> raw
val remember_only_metadata : t -> t
val iter_code : t -> f:(Code.t -> unit) -> unit
val map_result_types : t -> f:(Flambda2_types.t -> Flambda2_types.t) -> t
val code_metadata : t -> Code_metadata.t
val code_present : t -> bool
val map_raw_index : (int -> int) -> raw -> raw

As for Code_metadata, the free names of a value of type t do not include the code ID, which is only kept for convenience.

include Flambda2_nominal.Contains_names.S with type t := t

Compute the free names of a term. Such computation covers all kinds of bindable names (variables, continuations, ...)

val apply_renaming : t -> Flambda2_nominal.Renaming.t -> t

Apply a renaming throughout a term.

include Flambda2_nominal.Contains_ids.S with type t := t
val ids_for_export : t -> Flambda2_nominal.Ids_for_export.t

Gather all table identifiers to export them.