Module Includecore
type primitive_mismatch = | Name| Arity| No_alloc of Includecore.position| Builtin| Effects| Coeffects| Native_name| Result_repr| Argument_repr of int| Layout_poly_attr
type value_mismatch = | Primitive_mismatch of Includecore.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
exception Dont_match of Includecore.value_mismatchtype kind_mismatch = Includecore.type_kind * Includecore.type_kindtype label_mismatch = | Type of Errortrace.equality_error| Mutability of Includecore.position| Atomicity of Includecore.position| Modality of Mode.Modality.equate_error
type record_change =
(Types.label_declaration as 'ld, 'ld, Includecore.label_mismatch)
Diffing_with_keys.changetype record_mismatch = | Label_mismatch of Includecore.record_change list| Inlined_representation of Includecore.position| Float_representation of Includecore.position| Ufloat_representation of Includecore.position| Mixed_representation of Includecore.position| Mixed_representation_with_flat_floats of Includecore.position
type constructor_mismatch = | Type of Errortrace.equality_error| Arity| Inline_record of Includecore.record_change list| Kind of Includecore.position| Explicit_return_type of Includecore.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 * Includecore.constructor_mismatch
type variant_change =
(Types.constructor_declaration as 'cd, 'cd, Includecore.constructor_mismatch)
Diffing_with_keys.changetype private_variant_mismatch = | Only_outer_closed| Missing of Includecore.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 Includecore.position| Bounds_not_equal of Types.unsafe_mode_crossing * Types.unsafe_mode_crossing
type type_mismatch = | Arity| Privacy of Includecore.privacy_mismatch| Kind of Includecore.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 * Includecore.private_variant_mismatch| Private_object of Types.type_expr * Types.type_expr * Includecore.private_object_mismatch| Variance| Record_mismatch of Includecore.record_mismatch| Variant_mismatch of Includecore.variant_change list| Unboxed_representation of Includecore.position * Typedtree.attributes| Extensible_representation of Includecore.position| With_null_representation of Includecore.position| Jkind of Jkind.Violation.t| Unsafe_mode_crossing of Includecore.unsafe_mode_crossing_mismatch
type mmodes = | All(*Check module inclusion
*)M1 : MT1 @ m <= MT2 @ mfor allm.| Specific of Mode.Value.l * Mode.Value.r * 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 -> Includecore.mmodes -> 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:(Mode.Modality.t * Mode.Modality.t) ->
Includecore.mmodes ->
(Includecore.mmodes, 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 :
Env.t ->
?crossing:Mode.Crossing.t ->
item:Mode.Hint.lock_item ->
?typ:Types.type_expr ->
Includecore.mmodes ->
(unit, Mode.Value.error) Stdlib.Result.tClaim the current item is included by the RHS and its mode checked.
val value_descriptions :
loc:Location.t ->
Env.t ->
string ->
mmodes:Includecore.mmodes ->
Types.value_description ->
Types.value_description ->
Typedtree.module_coercionval type_declarations :
?equality:bool ->
loc:Location.t ->
Env.t ->
mark:bool ->
string ->
Types.type_declaration ->
Path.t ->
Types.type_declaration ->
Includecore.type_mismatch optionval extension_constructors :
loc:Location.t ->
Env.t ->
mark:bool ->
Ident.t ->
Types.extension_constructor ->
Types.extension_constructor ->
Includecore.extension_constructor_mismatch optionval report_value_mismatch :
string ->
string ->
Env.t ->
Stdlib.Format.formatter ->
Includecore.value_mismatch ->
unitval report_type_mismatch :
string ->
string ->
string ->
Env.t ->
Stdlib.Format.formatter ->
Includecore.type_mismatch ->
unitval report_modality_sub_error :
string ->
string ->
Stdlib.Format.formatter ->
Mode.Modality.error ->
unitval report_mode_sub_error :
string ->
string ->
Stdlib.Format.formatter ->
Mode.Value.error ->
unitval report_extension_constructor_mismatch :
string ->
string ->
string ->
Env.t ->
Stdlib.Format.formatter ->
Includecore.extension_constructor_mismatch ->
unit