jon.recoil.org

Module Flambda2_bound_identifiers.Bound_parameters

type t
val empty : t
val create : Bound_parameter.t list -> t
val cons : Bound_parameter.t -> t -> t
val append : t -> t -> t
val to_list : t -> Bound_parameter.t list
val is_empty : t -> bool
val same_number : t -> t -> bool
val equal : t -> t -> bool
val arity : t -> [> ] Flambda2_kinds.Flambda_arity.t
val check_no_duplicates : t -> unit
val cardinal : t -> int
val to_set : t -> Bound_parameter.Set.t
val iter : (Bound_parameter.t -> unit) -> t -> unit
val filter : (Bound_parameter.t -> bool) -> t -> t
val exists : (Bound_parameter.t -> bool) -> t -> bool
include Flambda2_nominal.Bindable.S with type t := t
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.

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

Freshen the given name.

val is_renamed_version_of : t -> t -> bool

Equivalence relation on renamed variables.

is_renamed_version_of x y is true if there exists a bindable z such that x and y are renamed versions of z.

Note: this function can return true in other cases (if there are some name collisions for instance), this is (at least currently) only used for a sanity check, so users should not rely too much on its expected semantics.

val renaming : t -> guaranteed_fresh:t -> Flambda2_nominal.Renaming.t

renaming stale ~guaranteed_fresh:fresh is to create a renaming that turns all occurrences of the name stale into fresh (in a capture-avoiding manner, but that is inherent in Renaming).