@@ -20,34 +20,37 @@ open Types
2020
2121type subtype_context =
2222 | Generic of {errorCode : string }
23+ (* * A generic subtype error, intended to be extended to be handled later. *)
2324 | Primitive_coercion_target_variant_not_unboxed of {
2425 variant_name : Path .t ;
2526 primitive : Path .t ;
26- }
27+ } (* * Coercing a primitive to a variant that is not unboxed. *)
2728 | Primitive_coercion_target_variant_no_catch_all of {
2829 variant_name : Path .t ;
2930 primitive : Path .t ;
3031 }
32+ (* * Coercing a primitive to a variant that does not have a catch-all case. *)
3133 | Variant_constructor_runtime_representation_mismatch of {
3234 variant_name : Path .t ;
3335 issues : Variant_coercion .variant_runtime_representation_issue list ;
3436 }
37+ (* * A variant constructor's runtime representation does not match the target variant. *)
3538 | Variant_configurations_mismatch of {
3639 left_variant_name : Path .t ;
3740 right_variant_name : Path .t ;
3841 issue : Variant_coercion .variant_configuration_issue ;
39- }
42+ } (* * Variants are configured differently. *)
4043 | Different_type_kinds of {
4144 left_typename : Path .t ;
4245 right_typename : Path .t ;
4346 left_type_kind : type_kind ;
4447 right_type_kind : type_kind ;
45- }
48+ } (* * The types are of different kinds. *)
4649 | Record_fields_mismatch of {
4750 left_record_name : Path .t ;
4851 right_record_name : Path .t ;
4952 issues : Record_coercion .record_field_subtype_violation list ;
50- }
53+ } (* * Records have fields that are not compatible. *)
5154
5255type type_pairs = (type_expr * type_expr ) list
5356exception Unify of type_pairs
0 commit comments