Module Ocaml_typing.Typedecl
val transl_type_decl :
Ocaml_typing.Env.t ->
Ocaml_parsing.Asttypes.rec_flag ->
Ocaml_parsing.Parsetree.type_declaration list ->
Ocaml_typing.Typedtree.type_declaration list
* Ocaml_typing.Env.t
* Ocaml_typing.Shape.t listval transl_exception :
Ocaml_typing.Env.t ->
Ocaml_parsing.Parsetree.extension_constructor ->
Ocaml_typing.Typedtree.extension_constructor
* Ocaml_typing.Env.t
* Ocaml_typing.Shape.tval transl_type_exception :
Ocaml_typing.Env.t ->
Ocaml_parsing.Parsetree.type_exception ->
Ocaml_typing.Typedtree.type_exception
* Ocaml_typing.Env.t
* Ocaml_typing.Shape.tval transl_type_extension :
bool ->
Ocaml_typing.Env.t ->
Ocaml_parsing.Location.t ->
Ocaml_parsing.Parsetree.type_extension ->
Ocaml_typing.Typedtree.type_extension
* Ocaml_typing.Env.t
* Ocaml_typing.Shape.t listtype transl_value_decl_modal = | Str_primitive(*A primitive in structure, in which case the modality syntax is treated as modes, and the returned value description will have empty modalities.
*)| Sig_value of Ocaml_typing.Mode.Value.l * Ocaml_typing.Mode.Modality.Const.t(*A value description in a signature, in which case we require the mode of the structure that the value lives in, as well as the default modalities of the signature.
*)
val transl_value_decl :
Ocaml_typing.Env.t ->
modal:Ocaml_typing.Typedecl.transl_value_decl_modal ->
why:Ocaml_typing.Jkind.History.concrete_creation_reason ->
Ocaml_parsing.Location.t ->
Ocaml_parsing.Parsetree.value_description ->
Ocaml_typing.Typedtree.value_description
* Ocaml_typing.Mode.Value.l
* Ocaml_typing.Env.tReturns a value description and the mode that the VD is based on, and a new environment that contains the VD at the mode.
val transl_with_constraint :
Ocaml_typing.Ident.t ->
?fixed_row_path:Ocaml_typing.Path.t ->
sig_env:Ocaml_typing.Env.t ->
sig_decl:Ocaml_typing.Types.type_declaration ->
outer_env:Ocaml_typing.Env.t ->
Ocaml_parsing.Parsetree.type_declaration ->
Ocaml_typing.Typedtree.type_declarationval transl_package_constraint :
loc:Ocaml_parsing.Location.t ->
Ocaml_typing.Types.type_expr ->
Ocaml_typing.Types.type_declarationval abstract_type_decl :
injective:bool ->
jkind:Ocaml_typing.Types.jkind_l ->
params:Ocaml_typing.Types.jkind_lr list ->
Ocaml_typing.Types.type_declarationval approx_type_decl :
Ocaml_parsing.Parsetree.type_declaration list ->
(Ocaml_typing.Ident.t * Ocaml_typing.Types.type_declaration) listval check_recmod_typedecl :
Ocaml_typing.Env.t ->
Ocaml_parsing.Location.t ->
Ocaml_typing.Ident.t list ->
Ocaml_typing.Path.t ->
Ocaml_typing.Types.type_declaration ->
unitval check_coherence :
Ocaml_typing.Env.t ->
Ocaml_parsing.Location.t ->
Ocaml_typing.Path.t ->
Ocaml_typing.Types.type_declaration ->
unitval is_fixed_type : Ocaml_parsing.Parsetree.type_declaration -> boolval mixed_block_element :
Ocaml_typing.Env.t ->
Ocaml_typing.Types.type_expr ->
_ Ocaml_typing.Types.jkind ->
Ocaml_typing.Types.mixed_block_elementtype reaching_type_path = Ocaml_typing.Typedecl.reaching_type_step listand reaching_type_step = | Expands_to of Ocaml_typing.Types.type_expr * Ocaml_typing.Types.type_expr| Contains of Ocaml_typing.Types.type_expr * Ocaml_typing.Types.type_expr
module Mixed_product_kind : sig ... endval assert_mixed_product_support :
Ocaml_utils.Warnings.loc ->
Ocaml_typing.Typedecl.Mixed_product_kind.t ->
value_prefix_len:int ->
unittype mixed_product_violation = | Runtime_support_not_enabled of Ocaml_typing.Typedecl.Mixed_product_kind.t| Extension_constructor| Value_prefix_too_long of {value_prefix_len : int;max_value_prefix_len : int;mixed_product_kind : Ocaml_typing.Typedecl.Mixed_product_kind.t;
}| Insufficient_level of {required_layouts_level : Ocaml_parsing.Language_extension.maturity;mixed_product_kind : Ocaml_typing.Typedecl.Mixed_product_kind.t;
}
type error = | Repeated_parameter| Duplicate_constructor of string| Too_many_constructors| Duplicate_label of string| Unboxed_mutable_label| Recursive_abbrev of string * Ocaml_typing.Env.t * Ocaml_typing.Typedecl.reaching_type_path| Cycle_in_def of string * Ocaml_typing.Env.t * Ocaml_typing.Typedecl.reaching_type_path| Unboxed_recursion of string * Ocaml_typing.Env.t * Ocaml_typing.Typedecl.reaching_type_path| Definition_mismatch of Ocaml_typing.Types.type_expr * Ocaml_typing.Env.t * Ocaml_typing.Includecore.type_mismatch option| Constraint_failed of Ocaml_typing.Env.t * Ocaml_typing.Errortrace.unification_error| Inconsistent_constraint of Ocaml_typing.Env.t * Ocaml_typing.Errortrace.unification_error| Type_clash of Ocaml_typing.Env.t * Ocaml_typing.Errortrace.unification_error| Non_regular of {definition : Ocaml_typing.Path.t;used_as : Ocaml_typing.Types.type_expr;defined_as : Ocaml_typing.Types.type_expr;reaching_path : Ocaml_typing.Typedecl.reaching_type_path;
}| Null_arity_external| Missing_native_external| Unbound_type_var of Ocaml_typing.Types.type_expr * Ocaml_typing.Types.type_declaration| Cannot_extend_private_type of Ocaml_typing.Path.t| Not_extensible_type of Ocaml_typing.Path.t| Extension_mismatch of Ocaml_typing.Path.t * Ocaml_typing.Env.t * Ocaml_typing.Includecore.type_mismatch| Rebind_wrong_type of Ocaml_parsing.Longident.t * Ocaml_typing.Env.t * Ocaml_typing.Errortrace.unification_error| Rebind_mismatch of Ocaml_parsing.Longident.t * Ocaml_typing.Path.t * Ocaml_typing.Path.t| Rebind_private of Ocaml_parsing.Longident.t| Variance of Ocaml_typing.Typedecl_variance.error| Unbound_type_var_ext of Ocaml_typing.Types.type_expr * Ocaml_typing.Types.extension_constructor| Val_in_structure| Multiple_native_repr_attributes| Cannot_unbox_or_untag_type of Ocaml_typing.Typedecl.native_repr_kind| Deep_unbox_or_untag_attribute of Ocaml_typing.Typedecl.native_repr_kind| Jkind_mismatch_of_type of Ocaml_typing.Types.type_expr * Ocaml_typing.Jkind.Violation.t| Jkind_mismatch_of_path of Ocaml_typing.Path.t * Ocaml_typing.Jkind.Violation.t| Jkind_mismatch_due_to_bad_inference of Ocaml_typing.Types.type_expr * Ocaml_typing.Jkind.Violation.t * Ocaml_typing.Typedecl.bad_jkind_inference_location| Jkind_sort of {kloc : Ocaml_typing.Typedecl.jkind_sort_loc;typ : Ocaml_typing.Types.type_expr;err : Ocaml_typing.Jkind.Violation.t;
}| Jkind_empty_record| Non_representable_in_module of Ocaml_typing.Jkind.Violation.t * Ocaml_typing.Types.type_expr| Invalid_jkind_in_block of Ocaml_typing.Types.type_expr * Ocaml_typing.Jkind.Sort.Const.t * Ocaml_typing.Typedecl.jkind_sort_loc| Illegal_mixed_product of Ocaml_typing.Typedecl.mixed_product_violation| Separability of Ocaml_typing.Typedecl_separability.error| Bad_unboxed_attribute of string| Boxed_and_unboxed| Nonrec_gadt| Invalid_private_row_declaration of Ocaml_typing.Types.type_expr| Local_not_enabled| Unexpected_layout_any_in_primitive of string| Useless_layout_poly| Zero_alloc_attr_unsupported of Ocaml_parsing.Builtin_attributes.zero_alloc_attribute| Zero_alloc_attr_non_function| Zero_alloc_attr_bad_user_arity| Invalid_reexport of {definition : Ocaml_typing.Path.t;expected : Ocaml_typing.Path.t;
}| Non_abstract_reexport of Ocaml_typing.Path.t| Unsafe_mode_crossing_on_invalid_type_kind| Illegal_baggage of Ocaml_typing.Types.jkind_l| No_unboxed_version of Ocaml_typing.Path.t| Atomic_field_must_be_mutable of string| Constructor_submode_failed of Ocaml_typing.Mode.Value.error| Atomic_field_in_mixed_block| Non_value_atomic_field
exception Error of Ocaml_parsing.Location.t * Ocaml_typing.Typedecl.errorval report_error :
Stdlib.Format.formatter ->
Ocaml_typing.Typedecl.error ->
unit