Module Ocaml_typing.Ctype
exception Unify of Ocaml_typing.Errortrace.unification_errorexception Equality of Ocaml_typing.Errortrace.equality_errorexception Moregen of Ocaml_typing.Errortrace.moregen_errorexception Subtype of Ocaml_typing.Errortrace.Subtype.errorexception Escape of Ocaml_typing.Types.type_expr Ocaml_typing.Errortrace.escapeexception Tags of Ocaml_parsing.Asttypes.label * Ocaml_parsing.Asttypes.labelval save_levels : unit -> Ocaml_typing.Ctype.levelsval set_levels : Ocaml_typing.Ctype.levels -> unitval newty : Ocaml_typing.Types.type_desc -> Ocaml_typing.Types.type_exprval new_scoped_ty :
int ->
Ocaml_typing.Types.type_desc ->
Ocaml_typing.Types.type_exprval newvar :
?name:string ->
Ocaml_typing.Types.jkind_lr ->
Ocaml_typing.Types.type_exprval new_rep_var :
?name:string ->
why:Ocaml_typing.Jkind.History.concrete_creation_reason ->
unit ->
Ocaml_typing.Types.type_expr * Ocaml_typing.Jkind.sortval newvar2 :
?name:string ->
int ->
Ocaml_typing.Types.jkind_lr ->
Ocaml_typing.Types.type_exprval new_global_var :
?name:string ->
Ocaml_typing.Types.jkind_lr ->
Ocaml_typing.Types.type_exprval newobj : Ocaml_typing.Types.type_expr -> Ocaml_typing.Types.type_exprval newconstr :
Ocaml_typing.Path.t ->
Ocaml_typing.Types.type_expr list ->
Ocaml_typing.Types.type_exprval newmono : Ocaml_typing.Types.type_expr -> Ocaml_typing.Types.type_exprval none : Ocaml_typing.Types.type_exprval object_fields :
Ocaml_typing.Types.type_expr ->
Ocaml_typing.Types.type_exprval flatten_fields :
Ocaml_typing.Types.type_expr ->
(string * Ocaml_typing.Types.field_kind * Ocaml_typing.Types.type_expr) list
* Ocaml_typing.Types.type_exprTransform a field type into a list of pairs label-type. The fields are sorted.
Beware of the interaction with GADTs:
Due to the introduction of object indexes for GADTs, the row variable of an object may now be an expansible type abbreviation. A first consequence is that flatten_fields will not completely flatten the object, since the type abbreviation will not be expanded (flatten_fields does not receive the current environment). Another consequence is that various functions may be called with the expansion of this type abbreviation, which is a Tfield, e.g. during printing.
Concrete problems have been fixed, but new bugs may appear in the future. (Test cases were added to typing-gadts/test.ml)
val associate_fields :
(string * Ocaml_typing.Types.field_kind * Ocaml_typing.Types.type_expr) list ->
(string * Ocaml_typing.Types.field_kind * Ocaml_typing.Types.type_expr) list ->
(string
* Ocaml_typing.Types.field_kind
* Ocaml_typing.Types.type_expr
* Ocaml_typing.Types.field_kind
* Ocaml_typing.Types.type_expr)
list
* (string * Ocaml_typing.Types.field_kind * Ocaml_typing.Types.type_expr)
list
* (string * Ocaml_typing.Types.field_kind * Ocaml_typing.Types.type_expr)
listval opened_object : Ocaml_typing.Types.type_expr -> boolval set_object_name :
Ocaml_typing.Ident.t ->
Ocaml_typing.Types.type_expr list ->
Ocaml_typing.Types.type_expr ->
unitval remove_object_name : Ocaml_typing.Types.type_expr -> unitval find_cltype_for_path :
Ocaml_typing.Env.t ->
Ocaml_typing.Path.t ->
Ocaml_typing.Types.type_declaration * Ocaml_typing.Types.type_exprval sort_row_fields :
(Ocaml_parsing.Asttypes.label * Ocaml_typing.Types.row_field) list ->
(Ocaml_parsing.Asttypes.label * Ocaml_typing.Types.row_field) listval merge_row_fields :
(Ocaml_parsing.Asttypes.label * Ocaml_typing.Types.row_field) list ->
(Ocaml_parsing.Asttypes.label * Ocaml_typing.Types.row_field) list ->
(Ocaml_parsing.Asttypes.label * Ocaml_typing.Types.row_field) list
* (Ocaml_parsing.Asttypes.label * Ocaml_typing.Types.row_field) list
* (Ocaml_parsing.Asttypes.label
* Ocaml_typing.Types.row_field
* Ocaml_typing.Types.row_field)
listval filter_row_fields :
bool ->
(Ocaml_parsing.Asttypes.label * Ocaml_typing.Types.row_field) list ->
(Ocaml_parsing.Asttypes.label * Ocaml_typing.Types.row_field) listval generalize : Ocaml_typing.Types.type_expr -> unitval lower_contravariant :
Ocaml_typing.Env.t ->
Ocaml_typing.Types.type_expr ->
unitval lower_variables_only :
Ocaml_typing.Env.t ->
int ->
Ocaml_typing.Types.type_expr ->
unitval enforce_current_level :
Ocaml_typing.Env.t ->
Ocaml_typing.Types.type_expr ->
unitval generalize_structure : Ocaml_typing.Types.type_expr -> unitval generalize_class_type : Ocaml_typing.Types.class_type -> unitval generalize_class_type_structure : Ocaml_typing.Types.class_type -> unitval generalize_class_signature_spine :
Ocaml_typing.Env.t ->
Ocaml_typing.Types.class_signature ->
unitval correct_levels :
Ocaml_typing.Types.type_expr ->
Ocaml_typing.Types.type_exprval limited_generalize :
Ocaml_typing.Types.type_expr ->
Ocaml_typing.Types.type_expr ->
unitval limited_generalize_class_type :
Ocaml_typing.Types.type_expr ->
Ocaml_typing.Types.class_type ->
unitval fully_generic : Ocaml_typing.Types.type_expr -> boolval check_scope_escape :
Ocaml_typing.Env.t ->
int ->
Ocaml_typing.Types.type_expr ->
unitval instance :
?partial:bool ->
Ocaml_typing.Types.type_expr ->
Ocaml_typing.Types.type_exprval generic_instance :
Ocaml_typing.Types.type_expr ->
Ocaml_typing.Types.type_exprval instance_list :
Ocaml_typing.Types.type_expr list ->
Ocaml_typing.Types.type_expr listval new_local_type :
?loc:Ocaml_parsing.Location.t ->
?manifest_and_scope:(Ocaml_typing.Types.type_expr * int) ->
Ocaml_typing.Types.type_origin ->
(Ocaml_typing.Mode.allowed * 'r) Ocaml_typing.Types.jkind ->
Ocaml_typing.Types.type_declarationmodule Pattern_env : sig ... endtype existential_treatment = | Keep_existentials_flexible| Make_existentials_abstract of Ocaml_typing.Ctype.Pattern_env.t
val instance_constructor :
Ocaml_typing.Ctype.existential_treatment ->
Ocaml_typing.Types.constructor_description ->
Ocaml_typing.Types.constructor_argument list
* Ocaml_typing.Types.type_expr
* Ocaml_typing.Types.type_expr listval instance_parameterized_type :
?keep_names:bool ->
Ocaml_typing.Types.type_expr list ->
Ocaml_typing.Types.type_expr ->
Ocaml_typing.Types.type_expr list * Ocaml_typing.Types.type_exprval instance_declaration :
Ocaml_typing.Types.type_declaration ->
Ocaml_typing.Types.type_declarationval generic_instance_declaration :
Ocaml_typing.Types.type_declaration ->
Ocaml_typing.Types.type_declarationval instance_class :
Ocaml_typing.Types.type_expr list ->
Ocaml_typing.Types.class_type ->
Ocaml_typing.Types.type_expr list * Ocaml_typing.Types.class_typeval instance_poly :
?keep_names:bool ->
Ocaml_typing.Types.type_expr list ->
Ocaml_typing.Types.type_expr ->
Ocaml_typing.Types.type_exprval instance_poly_fixed :
?keep_names:bool ->
Ocaml_typing.Types.type_expr list ->
Ocaml_typing.Types.type_expr ->
Ocaml_typing.Types.type_expr list * Ocaml_typing.Types.type_exprval polyfy :
Ocaml_typing.Env.t ->
Ocaml_typing.Types.type_expr ->
Ocaml_typing.Types.type_expr list ->
Ocaml_typing.Types.type_expr * boolval instance_label :
fixed:bool ->
_ Ocaml_typing.Types.gen_label_description ->
Ocaml_typing.Types.type_expr list
* Ocaml_typing.Types.type_expr
* Ocaml_typing.Types.type_exprval prim_mode :
(Ocaml_typing.Mode.allowed * 'r) Ocaml_typing.Mode.Locality.t option ->
(Ocaml_typing.Primitive.mode * Ocaml_typing.Primitive.native_repr) ->
(Ocaml_typing.Mode.allowed * 'r) Ocaml_typing.Mode.Locality.tval instance_prim :
Ocaml_typing.Primitive.description ->
Ocaml_typing.Types.type_expr ->
Ocaml_typing.Types.type_expr
* Ocaml_typing.Mode.Locality.lr option
* (Ocaml_typing.Mode.Forkable.lr * Ocaml_typing.Mode.Yielding.lr) option
* Ocaml_typing.Jkind.Sort.t optionval curry_mode :
Ocaml_typing.Mode.Alloc.Const.t ->
Ocaml_typing.Mode.Alloc.Const.t ->
Ocaml_typing.Mode.Alloc.Const.tGiven (a @ m1 -> b -> c) @ m0, where m0 and m1 are modes expressed by user-syntax, curry_mode m0 m1 gives the mode we implicitly interpret b->c to have.
val apply :
?use_current_level:bool ->
Ocaml_typing.Env.t ->
Ocaml_typing.Types.type_expr list ->
Ocaml_typing.Types.type_expr ->
Ocaml_typing.Types.type_expr list ->
Ocaml_typing.Types.type_exprval try_expand_once_opt :
Ocaml_typing.Env.t ->
Ocaml_typing.Types.type_expr ->
Ocaml_typing.Types.type_exprval try_expand_safe_opt :
Ocaml_typing.Env.t ->
Ocaml_typing.Types.type_expr ->
Ocaml_typing.Types.type_exprval expand_head_once :
Ocaml_typing.Env.t ->
Ocaml_typing.Types.type_expr ->
Ocaml_typing.Types.type_exprval expand_head :
Ocaml_typing.Env.t ->
Ocaml_typing.Types.type_expr ->
Ocaml_typing.Types.type_exprval expand_head_opt :
Ocaml_typing.Env.t ->
Ocaml_typing.Types.type_expr ->
Ocaml_typing.Types.type_exprThe compiler's own version of expand_head necessary for type-based optimisations.
Expansion of types for error traces; lives here instead of in Errortrace because the expansion machinery lives here.
val expanded_diff :
Ocaml_typing.Env.t ->
got:Ocaml_typing.Types.type_expr ->
expected:Ocaml_typing.Types.type_expr ->
(Ocaml_typing.Errortrace.expanded_type, 'variant) Ocaml_typing.Errortrace.eltCreate an Errortrace.Diff by expanding the two types
val unexpanded_diff :
got:Ocaml_typing.Types.type_expr ->
expected:Ocaml_typing.Types.type_expr ->
(Ocaml_typing.Errortrace.expanded_type, 'variant) Ocaml_typing.Errortrace.eltCreate an Errortrace.Diff by *duplicating* the two types, so that each one's expansion is identical to itself. Despite the name, does create Errortrace.expanded_types.
val full_expand :
may_forget_scope:bool ->
Ocaml_typing.Env.t ->
Ocaml_typing.Types.type_expr ->
Ocaml_typing.Types.type_exprtype typedecl_extraction_result = | Typedecl of Ocaml_typing.Path.t * Ocaml_typing.Path.t * Ocaml_typing.Types.type_declaration| Has_no_typedecl| May_have_typedecl
val extract_concrete_typedecl :
Ocaml_typing.Env.t ->
Ocaml_typing.Types.type_expr ->
Ocaml_typing.Ctype.typedecl_extraction_resultval unify :
Ocaml_typing.Env.t ->
Ocaml_typing.Types.type_expr ->
Ocaml_typing.Types.type_expr ->
unitval unify_var :
Ocaml_typing.Env.t ->
Ocaml_typing.Types.type_expr ->
Ocaml_typing.Types.type_expr ->
unitval unify_delaying_jkind_checks :
Ocaml_typing.Env.t ->
Ocaml_typing.Types.type_expr ->
Ocaml_typing.Types.type_expr ->
(Ocaml_typing.Types.type_expr * Ocaml_typing.Types.jkind_r) listtype filtered_arrow = {ty_arg : Ocaml_typing.Types.type_expr;arg_mode : Ocaml_typing.Mode.Alloc.lr;ty_ret : Ocaml_typing.Types.type_expr;ret_mode : Ocaml_typing.Mode.Alloc.lr;
}val filter_arrow :
Ocaml_typing.Env.t ->
Ocaml_typing.Types.type_expr ->
Ocaml_typing.Types.arg_label ->
force_tpoly:bool ->
Ocaml_typing.Ctype.filtered_arrowval filter_mono : Ocaml_typing.Types.type_expr -> Ocaml_typing.Types.type_exprval filter_arrow_mono :
Ocaml_typing.Env.t ->
Ocaml_typing.Types.type_expr ->
Ocaml_typing.Types.arg_label ->
Ocaml_typing.Ctype.filtered_arrowval filter_method :
Ocaml_typing.Env.t ->
string ->
Ocaml_typing.Types.type_expr ->
Ocaml_typing.Types.type_exprval occur_in :
Ocaml_typing.Env.t ->
Ocaml_typing.Types.type_expr ->
Ocaml_typing.Types.type_expr ->
boolval deep_occur_list :
Ocaml_typing.Types.type_expr ->
Ocaml_typing.Types.type_expr list ->
boolval deep_occur :
Ocaml_typing.Types.type_expr ->
Ocaml_typing.Types.type_expr ->
boolval moregeneral :
Ocaml_typing.Env.t ->
bool ->
Ocaml_typing.Types.type_expr ->
Ocaml_typing.Types.type_expr ->
unitval is_moregeneral :
Ocaml_typing.Env.t ->
bool ->
Ocaml_typing.Types.type_expr ->
Ocaml_typing.Types.type_expr ->
boolval all_distinct_vars :
Ocaml_typing.Env.t ->
Ocaml_typing.Types.type_expr list ->
booltype matches_result = | Unification_failure of Ocaml_typing.Errortrace.unification_error| Jkind_mismatch of {original_jkind : Ocaml_typing.Types.jkind_lr;inferred_jkind : Ocaml_typing.Types.jkind_lr;ty : Ocaml_typing.Types.type_expr;
}| All_good
val matches :
expand_error_trace:bool ->
Ocaml_typing.Env.t ->
Ocaml_typing.Types.type_expr ->
Ocaml_typing.Types.type_expr ->
Ocaml_typing.Ctype.matches_resultval reify_univars :
Ocaml_typing.Env.t ->
Ocaml_typing.Types.type_expr ->
Ocaml_typing.Types.type_exprtype filter_arrow_failure = | Unification_error of Ocaml_typing.Errortrace.unification_error| Label_mismatch of {got : Ocaml_typing.Types.arg_label;expected : Ocaml_typing.Types.arg_label;expected_type : Ocaml_typing.Types.type_expr;
}| Not_a_function| Jkind_error of Ocaml_typing.Types.type_expr * Ocaml_typing.Jkind.Violation.t
exception Filter_arrow_failed of Ocaml_typing.Ctype.filter_arrow_failuretype filter_method_failure = | Unification_error of Ocaml_typing.Errortrace.unification_error| Not_a_method| Not_an_object of Ocaml_typing.Types.type_expr| Not_a_value of Ocaml_typing.Jkind.Violation.t
exception Filter_method_failed of Ocaml_typing.Ctype.filter_method_failuretype class_match_failure = | CM_Virtual_class| CM_Parameter_arity_mismatch of int * int| CM_Type_parameter_mismatch of int * Ocaml_typing.Env.t * Ocaml_typing.Errortrace.equality_error| CM_Class_type_mismatch of Ocaml_typing.Env.t * Ocaml_typing.Types.class_type * Ocaml_typing.Types.class_type| CM_Parameter_mismatch of int * Ocaml_typing.Env.t * Ocaml_typing.Errortrace.moregen_error| CM_Val_type_mismatch of string * Ocaml_typing.Env.t * Ocaml_typing.Errortrace.comparison_error| CM_Meth_type_mismatch of string * Ocaml_typing.Env.t * Ocaml_typing.Errortrace.comparison_error| CM_Non_mutable_value of string| CM_Non_concrete_value of string| CM_Missing_value of string| CM_Missing_method of string| CM_Hide_public of string| CM_Hide_virtual of string * string| CM_Public_method of string| CM_Private_method of string| CM_Virtual_method of string
val match_class_types :
?trace:bool ->
Ocaml_typing.Env.t ->
Ocaml_typing.Types.class_type ->
Ocaml_typing.Types.class_type ->
Ocaml_typing.Ctype.class_match_failure listval equal :
?do_jkind_check:bool ->
Ocaml_typing.Env.t ->
bool ->
Ocaml_typing.Types.type_expr list ->
Ocaml_typing.Types.type_expr list ->
unitval is_equal :
Ocaml_typing.Env.t ->
bool ->
Ocaml_typing.Types.type_expr list ->
Ocaml_typing.Types.type_expr list ->
boolval equal_private :
Ocaml_typing.Env.t ->
Ocaml_typing.Types.type_expr ->
Ocaml_typing.Types.type_expr ->
unitval match_class_declarations :
Ocaml_typing.Env.t ->
Ocaml_typing.Types.type_expr list ->
Ocaml_typing.Types.class_type ->
Ocaml_typing.Types.type_expr list ->
Ocaml_typing.Types.class_type ->
Ocaml_typing.Ctype.class_match_failure listval enlarge_type :
Ocaml_typing.Env.t ->
Ocaml_typing.Types.type_expr ->
Ocaml_typing.Types.type_expr * boolval subtype :
Ocaml_typing.Env.t ->
Ocaml_typing.Types.type_expr ->
Ocaml_typing.Types.type_expr ->
unit ->
unitmodule Rigidify : sig ... endval new_class_signature : unit -> Ocaml_typing.Types.class_signatureval add_dummy_method :
Ocaml_typing.Env.t ->
scope:int ->
Ocaml_typing.Types.class_signature ->
unittype add_method_failure = | Unexpected_method| Type_mismatch of Ocaml_typing.Errortrace.unification_error
exception Add_method_failed of Ocaml_typing.Ctype.add_method_failureval add_method :
Ocaml_typing.Env.t ->
Ocaml_parsing.Asttypes.label ->
Ocaml_parsing.Asttypes.private_flag ->
Ocaml_parsing.Asttypes.virtual_flag ->
Ocaml_typing.Types.type_expr ->
Ocaml_typing.Types.class_signature ->
unittype add_instance_variable_failure = | Mutability_mismatch of Ocaml_parsing.Asttypes.mutable_flag| Type_mismatch of Ocaml_typing.Errortrace.unification_error
exception Add_instance_variable_failed of Ocaml_typing.Ctype.add_instance_variable_failureval add_instance_variable :
strict:bool ->
Ocaml_typing.Env.t ->
Ocaml_parsing.Asttypes.label ->
Ocaml_parsing.Asttypes.mutable_flag ->
Ocaml_parsing.Asttypes.virtual_flag ->
Ocaml_typing.Types.type_expr ->
Ocaml_typing.Types.class_signature ->
unittype inherit_class_signature_failure = | Self_type_mismatch of Ocaml_typing.Errortrace.unification_error| Method of Ocaml_parsing.Asttypes.label * Ocaml_typing.Ctype.add_method_failure| Instance_variable of Ocaml_parsing.Asttypes.label * Ocaml_typing.Ctype.add_instance_variable_failure
exception Inherit_class_signature_failed of Ocaml_typing.Ctype.inherit_class_signature_failureval inherit_class_signature :
strict:bool ->
Ocaml_typing.Env.t ->
Ocaml_typing.Types.class_signature ->
Ocaml_typing.Types.class_signature ->
unitval update_class_signature :
Ocaml_typing.Env.t ->
Ocaml_typing.Types.class_signature ->
Ocaml_parsing.Asttypes.label list * Ocaml_parsing.Asttypes.label listval hide_private_methods :
Ocaml_typing.Env.t ->
Ocaml_typing.Types.class_signature ->
unitval close_class_signature :
Ocaml_typing.Env.t ->
Ocaml_typing.Types.class_signature ->
boolexception Nondep_cannot_erase of Ocaml_typing.Ident.tval nondep_type :
Ocaml_typing.Env.t ->
Ocaml_typing.Ident.t list ->
Ocaml_typing.Types.type_expr ->
Ocaml_typing.Types.type_exprval nondep_type_decl :
Ocaml_typing.Env.t ->
Ocaml_typing.Ident.t list ->
bool ->
Ocaml_typing.Types.type_declaration ->
Ocaml_typing.Types.type_declarationval nondep_extension_constructor :
Ocaml_typing.Env.t ->
Ocaml_typing.Ident.t list ->
Ocaml_typing.Types.extension_constructor ->
Ocaml_typing.Types.extension_constructorval nondep_class_declaration :
Ocaml_typing.Env.t ->
Ocaml_typing.Ident.t list ->
Ocaml_typing.Types.class_declaration ->
Ocaml_typing.Types.class_declarationval nondep_cltype_declaration :
Ocaml_typing.Env.t ->
Ocaml_typing.Ident.t list ->
Ocaml_typing.Types.class_type_declaration ->
Ocaml_typing.Types.class_type_declarationval is_contractive : Ocaml_typing.Env.t -> Ocaml_typing.Path.t -> boolval normalize_type : Ocaml_typing.Types.type_expr -> unitval remove_mode_and_jkind_variables : Ocaml_typing.Types.type_expr -> unitval nongen_vars_in_schema :
Ocaml_typing.Env.t ->
Ocaml_typing.Types.type_expr ->
Ocaml_typing.Btype.TypeSet.t optionval nongen_vars_in_class_declaration :
Ocaml_typing.Types.class_declaration ->
Ocaml_typing.Btype.TypeSet.t optiontype closed_class_failure = {free_variable : Ocaml_typing.Types.type_expr * Ocaml_typing.Ctype.variable_kind;meth : string;meth_ty : Ocaml_typing.Types.type_expr;
}val free_variables :
?env:Ocaml_typing.Env.t ->
Ocaml_typing.Types.type_expr ->
Ocaml_typing.Types.type_expr listval free_non_row_variables_of_list :
Ocaml_typing.Types.type_expr list ->
Ocaml_typing.Types.type_expr listval free_variable_set_of_list :
Ocaml_typing.Env.t ->
Ocaml_typing.Types.type_expr list ->
Ocaml_typing.Btype.TypeSet.tval exists_free_variable :
(Ocaml_typing.Types.type_expr -> Ocaml_typing.Types.jkind_lr -> bool) ->
Ocaml_typing.Types.type_expr ->
boolval closed_type_expr :
?env:Ocaml_typing.Env.t ->
Ocaml_typing.Types.type_expr ->
boolval closed_type_decl :
Ocaml_typing.Types.type_declaration ->
Ocaml_typing.Types.type_expr optionval closed_extension_constructor :
Ocaml_typing.Types.extension_constructor ->
Ocaml_typing.Types.type_expr optionval closed_class :
Ocaml_typing.Types.type_expr list ->
Ocaml_typing.Types.class_signature ->
Ocaml_typing.Ctype.closed_class_failure optionval unalias : Ocaml_typing.Types.type_expr -> Ocaml_typing.Types.type_exprval arity : Ocaml_typing.Types.type_expr -> intval collapse_conj_params :
Ocaml_typing.Env.t ->
Ocaml_typing.Types.type_expr list ->
unitval wrap_trace_gadt_instances : Ocaml_typing.Env.t -> ('a -> 'b) -> 'a -> 'bval package_subtype :
(Ocaml_typing.Env.t ->
Ocaml_typing.Path.t ->
(Ocaml_parsing.Longident.t * Ocaml_typing.Types.type_expr) list ->
Ocaml_typing.Path.t ->
(Ocaml_parsing.Longident.t * Ocaml_typing.Types.type_expr) list ->
bool)
Stdlib.refval mcomp :
Ocaml_typing.Env.t ->
Ocaml_typing.Types.type_expr ->
Ocaml_typing.Types.type_expr ->
unittype unwrapped_type_expr = {ty : Ocaml_typing.Types.type_expr;modality : Ocaml_typing.Mode.Modality.Const.t;
}val get_unboxed_type_representation :
Ocaml_typing.Env.t ->
Ocaml_typing.Types.type_expr ->
(Ocaml_typing.Ctype.unwrapped_type_expr,
Ocaml_typing.Ctype.unwrapped_type_expr)
Stdlib.resultval get_unboxed_type_approximation :
Ocaml_typing.Env.t ->
Ocaml_typing.Types.type_expr ->
Ocaml_typing.Ctype.unwrapped_type_exprval contained_without_boxing :
Ocaml_typing.Env.t ->
Ocaml_typing.Types.type_expr ->
Ocaml_typing.Types.type_expr listval estimate_type_jkind :
Ocaml_typing.Env.t ->
Ocaml_typing.Types.type_expr ->
Ocaml_typing.Types.jkind_lval type_jkind :
Ocaml_typing.Env.t ->
Ocaml_typing.Types.type_expr ->
Ocaml_typing.Types.jkind_lval type_jkind_purely :
Ocaml_typing.Env.t ->
Ocaml_typing.Types.type_expr ->
Ocaml_typing.Types.jkind_lval type_jkind_purely_if_principal :
Ocaml_typing.Env.t ->
Ocaml_typing.Types.type_expr ->
Ocaml_typing.Types.jkind_l optionval mk_jkind_context :
Ocaml_typing.Env.t ->
(Ocaml_typing.Types.type_expr -> Ocaml_typing.Types.jkind_l option) ->
Ocaml_typing.Jkind.jkind_contextval mk_jkind_context_check_principal :
Ocaml_typing.Env.t ->
Ocaml_typing.Jkind.jkind_contextval mk_jkind_context_always_principal :
Ocaml_typing.Env.t ->
Ocaml_typing.Jkind.jkind_contextval type_sort :
why:Ocaml_typing.Jkind.History.concrete_creation_reason ->
fixed:bool ->
Ocaml_typing.Env.t ->
Ocaml_typing.Types.type_expr ->
(Ocaml_typing.Jkind.sort, Ocaml_typing.Jkind.Violation.t) Stdlib.resultval check_decl_jkind :
Ocaml_typing.Env.t ->
Ocaml_typing.Types.type_declaration ->
Ocaml_typing.Types.jkind_l ->
(unit, Ocaml_typing.Jkind.Violation.t) Stdlib.resultval constrain_decl_jkind :
Ocaml_typing.Env.t ->
Ocaml_typing.Types.type_declaration ->
Ocaml_typing.Types.jkind_l ->
(unit, Ocaml_typing.Jkind.Violation.t) Stdlib.resultval type_equal :
Ocaml_typing.Env.t ->
Ocaml_typing.Types.type_expr ->
Ocaml_typing.Types.type_expr ->
boolval check_type_jkind :
Ocaml_typing.Env.t ->
Ocaml_typing.Types.type_expr ->
('l * Ocaml_typing.Mode.allowed) Ocaml_typing.Types.jkind ->
(unit, Ocaml_typing.Jkind.Violation.t) Stdlib.resultval constrain_type_jkind :
Ocaml_typing.Env.t ->
Ocaml_typing.Types.type_expr ->
('l * Ocaml_typing.Mode.allowed) Ocaml_typing.Types.jkind ->
(unit, Ocaml_typing.Jkind.Violation.t) Stdlib.resultval check_type_externality :
Ocaml_typing.Env.t ->
Ocaml_typing.Types.type_expr ->
Ocaml_typing.Jkind_axis.Externality.t ->
boolval is_always_gc_ignorable :
Ocaml_typing.Env.t ->
Ocaml_typing.Types.type_expr ->
boolval check_type_nullability :
Ocaml_typing.Env.t ->
Ocaml_typing.Types.type_expr ->
Ocaml_typing.Jkind_axis.Nullability.t ->
boolval check_type_separability :
Ocaml_typing.Env.t ->
Ocaml_typing.Types.type_expr ->
Ocaml_typing.Jkind_axis.Separability.t ->
boolval check_and_update_generalized_ty_jkind :
?name:Ocaml_typing.Ident.t ->
loc:Ocaml_parsing.Location.t ->
Ocaml_typing.Env.t ->
Ocaml_typing.Types.type_expr ->
unitval is_principal : Ocaml_typing.Types.type_expr -> boolval global_state : Ocaml_typing.Ctype.global_stateval print_global_state :
Stdlib.Format.formatter ->
Ocaml_typing.Ctype.global_state ->
unitval crossing_of_jkind :
Ocaml_typing.Env.t ->
'd Ocaml_typing.Types.jkind ->
Ocaml_typing.Mode.Crossing.tGet the crossing of a jkind
val crossing_of_ty :
Ocaml_typing.Env.t ->
?modalities:Ocaml_typing.Mode.Modality.Const.t ->
Ocaml_typing.Types.type_expr ->
Ocaml_typing.Mode.Crossing.tGet the crossing of a type wrapped in modalities. Non-principal types get trivial crossing.
val cross_right :
Ocaml_typing.Env.t ->
?modalities:Ocaml_typing.Mode.Modality.Const.t ->
Ocaml_typing.Types.type_expr ->
Ocaml_typing.Mode.Value.r ->
Ocaml_typing.Mode.Value.rCross a right mode according to a type wrapped in modalities. Non-principal types don't cross.
val cross_left :
Ocaml_typing.Env.t ->
?modalities:Ocaml_typing.Mode.Modality.Const.t ->
Ocaml_typing.Types.type_expr ->
Ocaml_typing.Mode.Value.l ->
Ocaml_typing.Mode.Value.lCross a left mode according to a type wrapped in modalities. Non-principal types don't cross.
val cross_right_alloc :
Ocaml_typing.Env.t ->
?modalities:Ocaml_typing.Mode.Modality.Const.t ->
Ocaml_typing.Types.type_expr ->
Ocaml_typing.Mode.Alloc.r ->
Ocaml_typing.Mode.Alloc.rSimilar to cross_right but for Mode.Alloc
val cross_left_alloc :
Ocaml_typing.Env.t ->
?modalities:Ocaml_typing.Mode.Modality.Const.t ->
Ocaml_typing.Types.type_expr ->
Ocaml_typing.Mode.Alloc.l ->
Ocaml_typing.Mode.Alloc.lSimilar to cross_left but for Mode.Alloc
val zap_modalities_to_floor_if_modes_enabled_at :
Ocaml_parsing.Language_extension.maturity ->
Ocaml_typing.Mode.Modality.t ->
Ocaml_typing.Mode.Modality.Const.tZap a modality to floor if the modes extension is enabled at a level more immature than the given one. Zap to id otherwise.
val mode_crossing_structure_memaddr : Ocaml_typing.Mode.Crossing.tThe mode crossing of the memory block of a structure.
val mode_crossing_functor : Ocaml_typing.Mode.Crossing.tThe mode crossing of a functor.
val mode_crossing_module : Ocaml_typing.Mode.Crossing.tThe mode crossing of any module.
val zap_modalities_to_floor_if_at_least :
Ocaml_parsing.Language_extension.maturity ->
Ocaml_typing.Mode.Modality.t ->
Ocaml_typing.Mode.Modality.Const.tZap a modality to floor if maturity allows, zap to id otherwise.
val check_constructor_crossing_creation :
Ocaml_typing.Env.t ->
Ocaml_parsing.Longident.t Ocaml_parsing.Asttypes.loc ->
Ocaml_typing.Types.tag ->
res:Ocaml_typing.Types.type_expr ->
args:Ocaml_typing.Types.constructor_argument list ->
Ocaml_typing.Env.locks ->
(Ocaml_typing.Mode.Value.r, Ocaml_typing.Mode.Value.error) Stdlib.resultval check_constructor_crossing_destruction :
Ocaml_typing.Env.t ->
Ocaml_parsing.Longident.t Ocaml_parsing.Asttypes.loc ->
Ocaml_typing.Types.tag ->
res:Ocaml_typing.Types.type_expr ->
args:Ocaml_typing.Types.constructor_argument list ->
Ocaml_typing.Env.locks ->
(Ocaml_typing.Mode.Value.l, Ocaml_typing.Mode.Value.error) Stdlib.result