Module Ocaml_typing.Includecore
type primitive_mismatch = | Name| Arity| No_alloc of Ocaml_typing.Includecore.position| Builtin| Effects| Coeffects| Native_name| Result_repr| Argument_repr of int| Layout_poly_attr
type value_mismatch = | Primitive_mismatch of Ocaml_typing.Includecore.primitive_mismatch| Not_a_primitive| Type of Ocaml_typing.Errortrace.moregen_error| Zero_alloc of Ocaml_typing.Zero_alloc.error| Modality of Ocaml_typing.Mode.Modality.error| Mode of Ocaml_typing.Mode.Value.error
exception Dont_match of Ocaml_typing.Includecore.value_mismatchtype kind_mismatch =
Ocaml_typing.Includecore.type_kind * Ocaml_typing.Includecore.type_kindtype label_mismatch = | Type of Ocaml_typing.Errortrace.equality_error| Mutability of Ocaml_typing.Includecore.position| Atomicity of Ocaml_typing.Includecore.position| Modality of Ocaml_typing.Mode.Modality.equate_error
type record_change =
(Ocaml_typing.Types.label_declaration as 'ld,
'ld,
Ocaml_typing.Includecore.label_mismatch)
Ocaml_utils.Diffing_with_keys.changetype record_mismatch = | Label_mismatch of Ocaml_typing.Includecore.record_change list| Inlined_representation of Ocaml_typing.Includecore.position| Float_representation of Ocaml_typing.Includecore.position| Ufloat_representation of Ocaml_typing.Includecore.position| Mixed_representation of Ocaml_typing.Includecore.position| Mixed_representation_with_flat_floats of Ocaml_typing.Includecore.position
type constructor_mismatch = | Type of Ocaml_typing.Errortrace.equality_error| Arity| Inline_record of Ocaml_typing.Includecore.record_change list| Kind of Ocaml_typing.Includecore.position| Explicit_return_type of Ocaml_typing.Includecore.position| Modality of int * Ocaml_typing.Mode.Modality.equate_error
type extension_constructor_mismatch = | Constructor_privacy| Constructor_mismatch of Ocaml_typing.Ident.t * Ocaml_typing.Types.extension_constructor * Ocaml_typing.Types.extension_constructor * Ocaml_typing.Includecore.constructor_mismatch
type variant_change =
(Ocaml_typing.Types.constructor_declaration as 'cd,
'cd,
Ocaml_typing.Includecore.constructor_mismatch)
Ocaml_utils.Diffing_with_keys.changetype private_variant_mismatch = | Only_outer_closed| Missing of Ocaml_typing.Includecore.position * string| Presence of string| Incompatible_types_for of string| Types of Ocaml_typing.Errortrace.equality_error
type unsafe_mode_crossing_mismatch = | Mode_crossing_only_on of Ocaml_typing.Includecore.position| Bounds_not_equal of Ocaml_typing.Types.unsafe_mode_crossing * Ocaml_typing.Types.unsafe_mode_crossing
type type_mismatch = | Arity| Privacy of Ocaml_typing.Includecore.privacy_mismatch| Kind of Ocaml_typing.Includecore.kind_mismatch| Constraint of Ocaml_typing.Errortrace.equality_error| Manifest of Ocaml_typing.Errortrace.equality_error| Parameter_jkind of Ocaml_typing.Types.type_expr * Ocaml_typing.Jkind.Violation.t| Private_variant of Ocaml_typing.Types.type_expr * Ocaml_typing.Types.type_expr * Ocaml_typing.Includecore.private_variant_mismatch| Private_object of Ocaml_typing.Types.type_expr * Ocaml_typing.Types.type_expr * Ocaml_typing.Includecore.private_object_mismatch| Variance| Record_mismatch of Ocaml_typing.Includecore.record_mismatch| Variant_mismatch of Ocaml_typing.Includecore.variant_change list| Unboxed_representation of Ocaml_typing.Includecore.position * Ocaml_typing.Typedtree.attributes| Extensible_representation of Ocaml_typing.Includecore.position| With_null_representation of Ocaml_typing.Includecore.position| Jkind of Ocaml_typing.Jkind.Violation.t| Unsafe_mode_crossing of Ocaml_typing.Includecore.unsafe_mode_crossing_mismatch
type mmodes = | All(*Check module inclusion
*)M1 : MT1 @ m <= MT2 @ mfor allm.| Specific of Ocaml_typing.Mode.Value.l * Ocaml_typing.Mode.Value.r * Ocaml_typing.Typedtree.held_locks option(*Check module inclusion
M1 : MT1 @ m1 <= MT2 @ m2.No prior constraint between
m1andm2is given. In particular, it's possible thatm1 >= m2. For example, ifm1 = nonportable >= portable = m2andMT2 = sig end, the inclusion check should pass. This finer treatment is necessary for ergonomics.Another ergonomics is wrt closing over modules. If
*)M1is aPmod_ident, all surrounding functions would naively close overM1. However, ifM1 = nonportableandMT2 = sig end, surrounding functions shouldn't be forced tononportable. To that end, the locks leading toM1is not walked immediately upon look-up, but held and passed to inclusion check for finer treatment. This is the third constructor argument. This is similar to the ergonomics inTypecore.type_identwrt projections out of modules.
Describes the modes of modules on both sides, passed to inclusion check.
val child_modes :
string ->
Ocaml_typing.Includecore.mmodes ->
Ocaml_typing.Includecore.mmodesGives the modes suitable for the inclusion check of a child item, where there is no modality between the parent and the child. Takes the modes suitable for the parent item.
val child_modes_with_modalities :
string ->
modalities:(Ocaml_typing.Mode.Modality.t * Ocaml_typing.Mode.Modality.t) ->
Ocaml_typing.Includecore.mmodes ->
(Ocaml_typing.Includecore.mmodes, Ocaml_typing.Mode.Modality.error)
Stdlib.Result.tGives the modes suitable for the inclusion check of a child item. Takes the modes suitable for the inclusion check of the parent item, and both hands' modalities between the parent and the child.
val check_modes :
Ocaml_typing.Env.t ->
?crossing:Ocaml_typing.Mode.Crossing.t ->
item:Ocaml_typing.Mode.Hint.lock_item ->
?typ:Ocaml_typing.Types.type_expr ->
Ocaml_typing.Includecore.mmodes ->
(unit, Ocaml_typing.Mode.Value.error) Stdlib.Result.tClaim the current item is included by the RHS and its mode checked.
val value_descriptions :
loc:Ocaml_parsing.Location.t ->
Ocaml_typing.Env.t ->
string ->
mmodes:Ocaml_typing.Includecore.mmodes ->
Ocaml_typing.Types.value_description ->
Ocaml_typing.Types.value_description ->
Ocaml_typing.Typedtree.module_coercionval type_declarations :
?equality:bool ->
loc:Ocaml_parsing.Location.t ->
Ocaml_typing.Env.t ->
mark:bool ->
string ->
Ocaml_typing.Types.type_declaration ->
Ocaml_typing.Path.t ->
Ocaml_typing.Types.type_declaration ->
Ocaml_typing.Includecore.type_mismatch optionval extension_constructors :
loc:Ocaml_parsing.Location.t ->
Ocaml_typing.Env.t ->
mark:bool ->
Ocaml_typing.Ident.t ->
Ocaml_typing.Types.extension_constructor ->
Ocaml_typing.Types.extension_constructor ->
Ocaml_typing.Includecore.extension_constructor_mismatch optionval report_value_mismatch :
string ->
string ->
Ocaml_typing.Env.t ->
Stdlib.Format.formatter ->
Ocaml_typing.Includecore.value_mismatch ->
unitval report_type_mismatch :
string ->
string ->
string ->
Ocaml_typing.Env.t ->
Stdlib.Format.formatter ->
Ocaml_typing.Includecore.type_mismatch ->
unitval report_modality_sub_error :
string ->
string ->
Stdlib.Format.formatter ->
Ocaml_typing.Mode.Modality.error ->
unitval report_mode_sub_error :
string ->
string ->
Stdlib.Format.formatter ->
Ocaml_typing.Mode.Value.error ->
unitval report_extension_constructor_mismatch :
string ->
string ->
string ->
Ocaml_typing.Env.t ->
Stdlib.Format.formatter ->
Ocaml_typing.Includecore.extension_constructor_mismatch ->
unit