Up

Module Type_struct = Type_struct

Signature

module Name : sig .. end
module Variant : sig .. end
module Variant_infos : sig .. end
module Field : sig .. end
module Record_infos : sig .. end
type t =
| Int
| Int32
| Int64
| Nativeint
| Char
| Float
| String
| Bool
| Unit
| Option of t
| List of t
| Array of t
| Lazy of t
| Ref of t
| Tuple of t Farray.t
| Record of Record_infos.t * (Field.t * t) Farray.t
| Named of Name.t * t option
val sexp_of_t : t -> Sexplib.Sexp.t
type type_struct = t
val get_variant_by_repr : Variant_infos.t -> (Variant.t * t Farray.t) Farray.t -> int -> (Variant.t * t Farray.t) option
val get_variant_by_label : Variant_infos.t -> (Variant.t * t Farray.t) Farray.t -> string -> (Variant.t * t Farray.t) option
val variant_args_of_type_struct : arity:int -> t -> t Farray.t
val type_struct_of_variant_args : t Farray.t -> t
val option_as_variant : some:t -> Variant_infos.t * (Variant.t * t Farray.t) Farray.t
val incompatible : unit -> t
val alpha_conversion : t -> t
val remove_dead_links : t -> t
val has_named : t -> bool
val standalone_exn : readonly:t Name.Table.t -> t -> t

re put at least one Named let binding for each named used in the structure so that the structure is self contained, and not depend on table anymore. This is needed especially if the structure has to go outside and be given to some other part of the world

val reduce : t -> t
val are_equivalent : t -> t -> bool

This compare is insensible to alpha conversion of cycle indexes, as well as reduction. The polymorphic compare may be wrong for equivalent structures. See also alpha_conversion or reduce if needed.

This function considers equivalent polymorphic variants with different order of fields, as long as the order of cases is the only difference.

val least_upper_bound_exn : t -> t -> t

merge two types by regrouping the polymorphic variants, if this can be done. if this cannot be done, this raises with a reason for the error, in the hope that this information could be seen by an human, like a compiler type error message.

val is_polymorphic_variant : t -> bool
module type Typestructable = sig .. end
module Generic : Typerep_lib.Std.Type_generic.S with type 'a t = t
val of_typerep : 'a Typerep_lib.Std.Typerep.t -> t
val to_typerep : t -> Typerep_lib.Std.Typerep.packed

This generates new uniq Names for the type present in the structure. In particular, behavior overrides done via the generic registering mechanism will not occur when working out of the returned type_rep.

module Diff : sig .. end
Diff offers a way to know given two type structures if their bin_io representation would be compatible.
module Versioned : sig .. end
TODO: CLASS
module Named_utils (X : sig .. end) : sig .. end
type 'a typed_t = t
val recreate_dynamically_typerep_for_test : 'a Typerep_lib.Std.Typerep.t -> 'a Typerep_lib.Std.Typerep.t