jon.recoil.org

Module Flambda2_term_basics.Simple

A value that is known to fit into a register (of the appropriate kind) on the target machine. We do not require such values to be Let-bound.

include module type of struct include Flambda2_identifiers.Int_ids.Simple end
include Flambda2_algorithms.Container_types.S_plus_iterator with type t := Flambda2_term_basics.Simple.t
include Flambda2_algorithms.Container_types_intf.Thing with type t := T.t
include Stdlib.Hashtbl.HashedType with type t := T.t
val equal : T.t -> T.t -> bool

The equality predicate used to compare keys.

val hash : T.t -> int

A hashing function on keys. It must be such that if two keys are equal according to equal, then they have identical hash values as computed by hash. Examples: suitable (equal, hash) pairs for arbitrary key types include

  • ((=), hash) for comparing objects by structure (provided objects do not contain floats)
  • ((fun x y -> compare x y = 0), hash) for comparing objects by structure and handling Stdlib.nan correctly
  • ((==), hash) for comparing objects by physical equality (e.g. for mutable or cyclic objects).
include Stdlib.Map.OrderedType with type t := T.t
val compare : T.t -> T.t -> int

A total ordering function over the keys. This is a two-argument function f such that f e1 e2 is zero if the keys e1 and e2 are equal, f e1 e2 is strictly negative if e1 is smaller than e2, and f e1 e2 is strictly positive if e1 is greater than e2. Example: a suitable ordering function is the generic structural comparison function Stdlib.compare.

val print : Stdlib.Format.formatter -> T.t -> unit
include Flambda2_nominal.Contains_names.S with type t := Flambda2_term_basics.Simple.t

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

Apply a renaming throughout a term.

val has_coercion : Flambda2_term_basics.Simple.t -> bool

The constant representating the given number of type "int".

The constant representating the given boolean value.

The naked immediate constant representating the given boolean value.

The constant representating boolean true.

The constant representating boolean false.

The constant representating the number zero of type "int".

The constant representing the unit value.

val is_const : Flambda2_term_basics.Simple.t -> bool
val is_symbol : Flambda2_term_basics.Simple.t -> bool
val is_var : Flambda2_term_basics.Simple.t -> bool
val is_imported_or_constant : Flambda2_term_basics.Simple.t -> bool
module List : sig ... end
module With_kind : sig ... end
module With_debuginfo : sig ... end