Module Ocaml_typing.Typetexp
module TyVarEnv : sig ... endval type_open :
(?used_slot:bool Stdlib.ref ->
Ocaml_parsing.Asttypes.override_flag ->
Ocaml_typing.Env.t ->
Ocaml_parsing.Location.t ->
Ocaml_parsing.Longident.t Ocaml_parsing.Asttypes.loc ->
Ocaml_typing.Path.t * Ocaml_typing.Env.t)
Stdlib.refval transl_label :
Ocaml_parsing.Parsetree.arg_label ->
Ocaml_parsing.Parsetree.core_type option ->
Ocaml_typing.Types.arg_labeltransl_label lbl ty produces a Typedtree argument label for an argument with label lbl and type ty.
Position arguments (lbl:[%call_pos] -> ...) are parsed as Labelled l. This function converts them to Position l when the type is of the form [%call_pos].
val transl_label_from_pat :
Ocaml_parsing.Parsetree.arg_label ->
Ocaml_parsing.Parsetree.pattern ->
Ocaml_typing.Types.arg_label * Ocaml_parsing.Parsetree.patternProduces a Typedtree argument label, as well as the pattern corresponding to the argument. transl_label lbl pat is equal to:
Position l, PwhenlblisLabelled landpatrepresents(P : [%call_pos])transl_label lbl None, patotherwise.
val transl_label_from_expr :
Ocaml_parsing.Parsetree.arg_label ->
Ocaml_parsing.Parsetree.expression ->
Ocaml_typing.Types.arg_label * Ocaml_parsing.Parsetree.expressionLike transl_label_from_pat, but with special handling for expressions (E : [%call_pos]) instead of for patterns.
val transl_simple_type :
Ocaml_typing.Env.t ->
new_var_jkind:Ocaml_typing.Typetexp.jkind_initialization_choice ->
?univars:Ocaml_typing.Typetexp.TyVarEnv.poly_univars ->
closed:bool ->
Ocaml_typing.Mode.Alloc.Const.t ->
Ocaml_parsing.Parsetree.core_type ->
Ocaml_typing.Typedtree.core_typeval transl_simple_type_univars :
Ocaml_typing.Env.t ->
Ocaml_parsing.Parsetree.core_type ->
Ocaml_typing.Typedtree.core_typeval transl_simple_type_delayed :
Ocaml_typing.Env.t ->
Ocaml_typing.Mode.Alloc.Const.t ->
Ocaml_parsing.Parsetree.core_type ->
Ocaml_typing.Typedtree.core_type
* Ocaml_typing.Types.type_expr
* (unit ->
unit)val transl_type_scheme :
Ocaml_typing.Env.t ->
Ocaml_parsing.Parsetree.core_type ->
Ocaml_typing.Typedtree.core_typeval transl_type_param :
Ocaml_typing.Env.t ->
Ocaml_typing.Path.t ->
Ocaml_typing.Types.jkind_lr ->
Ocaml_parsing.Parsetree.core_type ->
Ocaml_typing.Typedtree.core_typeval get_type_param_jkind :
Ocaml_typing.Path.t ->
Ocaml_parsing.Parsetree.core_type ->
Ocaml_typing.Types.jkind_lrval get_type_param_name : Ocaml_parsing.Parsetree.core_type -> string optiontype error = | Unbound_type_variable of string * string list * Ocaml_typing.Typetexp.unbound_variable_reason option| No_type_wildcards of Ocaml_typing.Typetexp.unbound_variable_reason option| Undefined_type_constructor of Ocaml_typing.Path.t| Type_arity_mismatch of Ocaml_parsing.Longident.t * int * int| Bound_type_variable of string| Recursive_type| Type_mismatch of Ocaml_typing.Errortrace.unification_error| Alias_type_mismatch of Ocaml_typing.Errortrace.unification_error| Present_has_conjunction of string| Present_has_no_type of string| Constructor_mismatch of Ocaml_typing.Types.type_expr * Ocaml_typing.Types.type_expr| Not_a_variant of Ocaml_typing.Types.type_expr| Invalid_variable_name of string| Cannot_quantify of string * Ocaml_typing.Typetexp.cannot_quantify_reason| Bad_univar_jkind of {name : string;jkind_info : Ocaml_typing.Typetexp.jkind_info;inferred_jkind : Ocaml_typing.Types.jkind_lr;
}| Multiple_constraints_on_type of Ocaml_parsing.Longident.t| Method_mismatch of string * Ocaml_typing.Types.type_expr * Ocaml_typing.Types.type_expr| Opened_object of Ocaml_typing.Path.t option| Not_an_object of Ocaml_typing.Types.type_expr| Unsupported_extension : _ Ocaml_parsing.Language_extension.t -> Ocaml_typing.Typetexp.error| Polymorphic_optional_param| Non_value of {vloc : Ocaml_typing.Typetexp.value_loc;typ : Ocaml_typing.Types.type_expr;err : Ocaml_typing.Jkind.Violation.t;
}| Non_sort of {vloc : Ocaml_typing.Typetexp.sort_loc;typ : Ocaml_typing.Types.type_expr;err : Ocaml_typing.Jkind.Violation.t;
}| Bad_jkind_annot of Ocaml_typing.Types.type_expr * Ocaml_typing.Jkind.Violation.t| Did_you_mean_unboxed of Ocaml_parsing.Longident.t| Invalid_label_for_call_pos of Ocaml_parsing.Parsetree.arg_label| Invalid_variable_stage of {name : string;intro_stage : Ocaml_typing.Env.stage;usage_stage : Ocaml_typing.Env.stage;
}
exception Error of Ocaml_parsing.Location.t
* Ocaml_typing.Env.t
* Ocaml_typing.Typetexp.errorval report_error :
Ocaml_typing.Env.t ->
Stdlib.Format.formatter ->
Ocaml_typing.Typetexp.error ->
unitval transl_modtype_longident :
(Ocaml_parsing.Location.t ->
Ocaml_typing.Env.t ->
Ocaml_parsing.Longident.t ->
Ocaml_typing.Path.t)
Stdlib.refval transl_modtype :
(Ocaml_typing.Env.t ->
Ocaml_parsing.Parsetree.module_type ->
Ocaml_typing.Typedtree.module_type)
Stdlib.refval check_package_with_type_constraints :
(Ocaml_parsing.Location.t ->
Ocaml_typing.Env.t ->
Ocaml_typing.Types.module_type ->
(Ocaml_parsing.Longident.t Ocaml_parsing.Asttypes.loc
* Ocaml_typing.Typedtree.core_type)
list ->
Ocaml_typing.Types.module_type)
Stdlib.ref