Skip to content

Commit 77dcc5a

Browse files
committed
add comments
1 parent 6a4d5f2 commit 77dcc5a

File tree

1 file changed

+7
-4
lines changed

1 file changed

+7
-4
lines changed

compiler/ml/ctype.mli

Lines changed: 7 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -20,34 +20,37 @@ open Types
2020

2121
type 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

5255
type type_pairs = (type_expr * type_expr) list
5356
exception Unify of type_pairs

0 commit comments

Comments
 (0)