jon.recoil.org

Module Flambda2_kinds.Flambda_kind

Kinds and subkinds of Flambda types.

module Naked_number_kind : sig ... end
type t = private
  1. | Value
    (*

    OCaml values, either immediates or pointers.

    *)
  2. | Naked_number of Naked_number_kind.t
    (*

    The kind of unboxed numbers and untagged immediates.

    *)
  3. | Region
    (*

    Values which have been introduced by Flambda and are never accessible at the source language level (for example sets of closures).

    *)
  4. | Rec_info
    (*

    Recursion depths of identifiers. Like Region, not accessible at the source level, but also not accessible at run time.

    *)

The kinds themselves.

type kind = t
val value : t

Constructors for the various kinds.

val naked_number : Naked_number_kind.t -> t
val naked_immediate : t
val naked_float32 : t
val naked_float : t
val naked_int8 : t
val naked_int16 : t
val naked_int32 : t
val naked_int64 : t
val naked_nativeint : t
val naked_vec128 : t
val naked_vec256 : t
val naked_vec512 : t
val region : t
val rec_info : t
val is_value : t -> bool
val is_naked_float : 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 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 : Format.formatter -> T.t -> unit
module Map : Flambda2_algorithms.Container_types_intf.Map with type key = t and module Set = Set
type flat_suffix_element =
  1. | Naked_float
  2. | Naked_float32
  3. | Naked_int8
  4. | Naked_int16
  5. | Naked_int32
  6. | Naked_int64
  7. | Naked_nativeint
  8. | Naked_immediate
  9. | Naked_vec128
  10. | Naked_vec256
  11. | Naked_vec512
module Mixed_block_lambda_shape = Mixed_block_shape
module Mixed_block_shape : sig ... end
module Scannable_block_shape : sig ... end
module Block_shape : sig ... end
module Standard_int : sig ... end
module Boxable_number : sig ... end

These kinds are those of the numbers for which a tailored boxed representation exists.

module With_subkind : sig ... end
module Flat_suffix_element : sig ... end
module Standard_int_or_float : sig ... end