Module Ocaml_typing.IncludecoreSource
type layout_poly_coercion = | Extra_lhs of {}(*
*)firsthasextramore layout parameters thansecond.| Extra_rhs of {}(*
*)secondhasextramore layout parameters thanfirst.| Instantiate_lhs_to_rhs of {}(*The sort poly var at position
*)index_lhsinfirstis instantiated with the sort poly var at positionindex_rhsinsecond(not positionindex_lhsas expected).| Instantiate_lhs of {index_lhs : int;arg : Jkind_types.Sort.t option;
}(*The sort poly var at position
*)index_lhsinfirstis instantiated witharg, which is not any sort poly var ofsecond.
type 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.error| Layout_poly_coercion of layout_poly_coercion
type label_mismatch = | Type of Errortrace.equality_error| Mutability of position| Atomicity of position| Modality of Mode.Modality.equate_error
type 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_error
type extension_constructor_mismatch = | Constructor_privacy| Constructor_mismatch of Ident.t * Types.extension_constructor * Types.extension_constructor * constructor_mismatch
type 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_error
type unsafe_mode_crossing_mismatch = | Mode_crossing_only_on of position| Bounds_not_equal of Types.unsafe_mode_crossing * Types.unsafe_mode_crossing
type 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_mismatch
type mmodes = | All(*Check module inclusion
*)M1 : MT1 @ m <= MT2 @ mfor allm.| Specific : ((Mode.allowed * 'r) Mode.Value.t * Typedtree.held_locks option) * ('l * Mode.allowed) Mode.Value.t -> mmodes(*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.
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 jkind_declarations :
loc:Ocaml_parsing.Location.t ->
Env.t ->
string ->
Types.jkind_declaration ->
Types.jkind_declaration ->
jkind_mismatch optionval report_value_mismatch :
pp:Ocaml_typing.Mode.Hint.pinpoint ->
string ->
string ->
Env.t ->
value_mismatch Ocaml_utils.Format_doc.printerval report_type_mismatch :
string ->
string ->
string ->
Env.t ->
type_mismatch Ocaml_utils.Format_doc.printerval report_modality_sub_error :
string ->
string ->
Ocaml_utils.Format_doc.formatter ->
Mode.Modality.error ->
unitval report_mode_sub_error :
pp:Ocaml_typing.Mode.Hint.pinpoint ->
string ->
string ->
Ocaml_utils.Format_doc.formatter ->
Mode.Value.error ->
unitval report_extension_constructor_mismatch :
string ->
string ->
string ->
Env.t ->
extension_constructor_mismatch Ocaml_utils.Format_doc.printerval report_jkind_mismatch :
string ->
string ->
Ocaml_utils.Format_doc.formatter ->
jkind_mismatch ->
unit