jon.recoil.org

Module Name_mode.Or_absent

type t = private
  1. | Absent
  2. | Present of name_mode
val absent : t
val present : name_mode -> t
val is_present : t -> bool
val is_present_as_normal : t -> bool
include Flambda2_algorithms.Container_types.S with type t := t
include Flambda2_algorithms.Container_types_intf.Thing with type t := T.t
include 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 Map.OrderedType with type t := T.t
val print : Format.formatter -> T.t -> unit
module Map : Flambda2_algorithms.Container_types_intf.Map with type key = t and module Set = Set
val compare_partial_order : t -> t -> int option
val compare : t -> t -> [ `Be_explicit_about_total_or_partial_ordering ]

This shadows compare from the above include.

val join_in_terms : t -> t -> t