Ocaml_typing.Includecoretype primitive_mismatch = | Name| Arity| No_alloc of position| Builtin| Effects| Coeffects| Native_name| Result_repr| Argument_repr of int| Layout_poly_attrtype value_mismatch = | Primitive_mismatch of primitive_mismatch| Not_a_primitive| Type of Errortrace.moregen_error| Zero_alloc of Zero_alloc.error| Modality of Mode.Modality.error| Mode of Mode.Value.errorexception Dont_match of value_mismatchtype label_mismatch = | Type of Errortrace.equality_error| Mutability of position| Atomicity of position| Modality of Mode.Modality.equate_errortype record_change =
(Types.label_declaration as 'ld, 'ld, label_mismatch)
Ocaml_utils.Diffing_with_keys.changetype constructor_mismatch = | Type of Errortrace.equality_error| Arity| Inline_record of record_change list| Kind of position| Explicit_return_type of position| Modality of int * Mode.Modality.equate_errortype extension_constructor_mismatch = | Constructor_privacy| Constructor_mismatch of Ident.t
* Types.extension_constructor
* Types.extension_constructor
* constructor_mismatchtype variant_change =
(Types.constructor_declaration as 'cd, 'cd, constructor_mismatch)
Ocaml_utils.Diffing_with_keys.changetype private_variant_mismatch = | Only_outer_closed| Missing of position * string| Presence of string| Incompatible_types_for of string| Types of Errortrace.equality_errortype unsafe_mode_crossing_mismatch = | Mode_crossing_only_on of position| Bounds_not_equal of Types.unsafe_mode_crossing * Types.unsafe_mode_crossingtype type_mismatch = | Arity| Privacy of privacy_mismatch| Kind of kind_mismatch| Constraint of Errortrace.equality_error| Manifest of Errortrace.equality_error| Parameter_jkind of Types.type_expr * Jkind.Violation.t| Private_variant of Types.type_expr * Types.type_expr * private_variant_mismatch| Private_object of Types.type_expr * Types.type_expr * private_object_mismatch| Variance| Record_mismatch of record_mismatch| Variant_mismatch of variant_change list| Unboxed_representation of position * Typedtree.attributes| Extensible_representation of position| With_null_representation of position| Jkind of Jkind.Violation.t| Unsafe_mode_crossing of unsafe_mode_crossing_mismatchtype mmodes = | AllCheck module inclusion M1 : MT1 @ m <= MT2 @ m for all m.
| Specific of Mode.Value.l * Mode.Value.r * Typedtree.held_locks optionCheck module inclusion M1 : MT1 @ m1 <= MT2 @ m2.
No prior constraint between m1 and m2 is given. In particular, it's possible that m1 >= m2. For example, if m1 = nonportable >= portable = m2 and MT2 = sig end, the inclusion check should pass. This finer treatment is necessary for ergonomics.
Another ergonomics is wrt closing over modules. If M1 is a Pmod_ident, all surrounding functions would naively close over M1. However, if M1 = nonportable and MT2 = sig end, surrounding functions shouldn't be forced to nonportable. To that end, the locks leading to M1 is 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 in Typecore.type_ident wrt projections out of modules.
Describes the modes of modules on both sides, passed to inclusion check.
Gives 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:(Mode.Modality.t * Mode.Modality.t) ->
mmodes ->
(mmodes, Mode.Modality.error) 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 :
Env.t ->
?crossing:Mode.Crossing.t ->
item:Ocaml_typing.Mode.Hint.lock_item ->
?typ:Types.type_expr ->
mmodes ->
(unit, Mode.Value.error) Result.tClaim the current item is included by the RHS and its mode checked.
val value_descriptions :
loc:Ocaml_parsing.Location.t ->
Env.t ->
string ->
mmodes:mmodes ->
Types.value_description ->
Types.value_description ->
Typedtree.module_coercionval type_declarations :
?equality:bool ->
loc:Ocaml_parsing.Location.t ->
Env.t ->
mark:bool ->
string ->
Types.type_declaration ->
Path.t ->
Types.type_declaration ->
type_mismatch optionval extension_constructors :
loc:Ocaml_parsing.Location.t ->
Env.t ->
mark:bool ->
Ident.t ->
Types.extension_constructor ->
Types.extension_constructor ->
extension_constructor_mismatch optionval report_value_mismatch :
string ->
string ->
Env.t ->
Format.formatter ->
value_mismatch ->
unitval report_type_mismatch :
string ->
string ->
string ->
Env.t ->
Format.formatter ->
type_mismatch ->
unitval report_modality_sub_error :
string ->
string ->
Format.formatter ->
Mode.Modality.error ->
unitval report_mode_sub_error :
string ->
string ->
Format.formatter ->
Mode.Value.error ->
unitval report_extension_constructor_mismatch :
string ->
string ->
string ->
Env.t ->
Format.formatter ->
extension_constructor_mismatch ->
unit