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
type t = private Flambda2_algorithms.Table_by_int_id.Id.ttype exported = Flambda2_identifiers.Int_ids.Simple.exportedinclude Flambda2_algorithms.Container_types.S_plus_iterator with type t := t
module T = Flambda2_identifiers.Int_ids.Simple.Tinclude Flambda2_algorithms.Container_types_intf.Thing with type t := T.t
include Hashtbl.HashedType with type t := T.t
val hash : T.t -> intA 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 handlingStdlib.nancorrectly - (
(==),hash) for comparing objects by physical equality (e.g. for mutable or cyclic objects).
include Map.OrderedType with type t := T.t
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 : Format.formatter -> T.t -> unitmodule Set = Flambda2_identifiers.Int_ids.Simple.Setmodule Map = Flambda2_identifiers.Int_ids.Simple.Mapval name : Flambda2_identifiers.Int_ids.Name.t -> tval var : Flambda2_identifiers.Int_ids.Variable.t -> tval vars : Flambda2_identifiers.Int_ids.Variable.t list -> t listval symbol : Flambda2_identifiers.Int_ids.Symbol.t -> tval const : Flambda2_identifiers.Int_ids.Const.t -> tval coercion : t -> Flambda2_identifiers.Int_ids.Coercion.tval with_coercion : t -> Flambda2_identifiers.Int_ids.Coercion.t -> tval pattern_match :
t ->
name:
(Flambda2_identifiers.Int_ids.Name.t ->
coercion:Flambda2_identifiers.Int_ids.Coercion.t ->
'a) ->
const:(Flambda2_identifiers.Int_ids.Const.t -> 'a) ->
'ainclude Flambda2_nominal.Contains_names.S with type t := t
val free_names : t -> Flambda2_nominal.Name_occurrences.tCompute the free names of a term. Such computation covers all kinds of bindable names (variables, continuations, ...)
val apply_renaming : t -> Flambda2_nominal.Renaming.t -> tApply a renaming throughout a term.
val has_coercion : t -> boolval apply_coercion : t -> Coercion.t -> t optionval apply_coercion_exn : t -> Coercion.t -> tval must_be_var : t -> (Flambda2_identifiers.Variable.t * Coercion.t) optionval must_be_symbol : t -> (Flambda2_identifiers.Symbol.t * Coercion.t) optionval must_be_name : t -> (Flambda2_identifiers.Name.t * Coercion.t) optionval must_be_const : t -> Flambda2_identifiers.Reg_width_const.t optionval const_int : Flambda2_numbers.Target_ocaml_int.t -> tThe constant representating the given number of type "int".
val const_bool : Target_system.Machine_width.t -> bool -> tThe constant representating the given boolean value.
val untagged_const_bool : Target_system.Machine_width.t -> bool -> tThe naked immediate constant representating the given boolean value.
val const_true : Target_system.Machine_width.t -> tThe constant representating boolean true.
val untagged_const_true : Target_system.Machine_width.t -> tval const_false : Target_system.Machine_width.t -> tThe constant representating boolean false.
val untagged_const_false : Target_system.Machine_width.t -> tval const_zero : Target_system.Machine_width.t -> tThe constant representating the number zero of type "int".
val untagged_const_zero : Target_system.Machine_width.t -> tval untagged_const_int : Flambda2_numbers.Target_ocaml_int.t -> tval const_one : Target_system.Machine_width.t -> tval const_unit : Target_system.Machine_width.t -> tThe constant representing the unit value.
val const_from_descr : Flambda2_identifiers.Reg_width_const.Descr.t -> tval const_int_of_kind :
machine_width:Target_system.Machine_width.t ->
Flambda2_kinds.Flambda_kind.t ->
int ->
tval is_const : t -> boolval is_symbol : t -> boolval is_var : t -> boolval is_imported_or_constant : t -> boolval free_names_in_types : t -> Flambda2_nominal.Name_occurrences.tval pattern_match' :
t ->
var:(Flambda2_identifiers.Variable.t -> coercion:Coercion.t -> 'a) ->
symbol:(Flambda2_identifiers.Symbol.t -> coercion:Coercion.t -> 'a) ->
const:(Flambda2_identifiers.Reg_width_const.t -> 'a) ->
'aval kind : t -> Flambda2_kinds.Flambda_kind.tmodule List : sig ... endmodule With_kind : sig ... endmodule With_debuginfo : sig ... end