@@ -1540,17 +1540,16 @@ let print_variant_runtime_representation_issue ppf variant_name
15401540 | Inline_record_cannot_be_coerced {constructor_name} ->
15411541 fprintf ppf
15421542 " The constructor @{<info>%s@} of variant @{<info>%s@} has an inline \
1543- record as payload. Inline records cannot be coerced."
1543+ record as payload. Currently, inline records cannot be coerced."
15441544 constructor_name (Path. name variant_name)
1545- | As_payload_cannot_be_coerced
1545+ | As_payload_not_elgible_for_coercion
15461546 {constructor_name; as_payload; expected_typename} ->
15471547 fprintf ppf
15481548 " The constructor @{<info>%s@} of variant @{<info>%s@} has an \
15491549 @{<info>@as@} payload that has a runtime representation of \
1550- @{<info>%s@}, which is not compatible with the expected of \
1551- @{<info>%s@}."
1550+ @{<info>%s@}, which is not compatible with the expected @{<info>%s@}."
15521551 constructor_name (Path. name variant_name)
1553- (Ast_untagged_variants. tag_type_to_string as_payload)
1552+ (Ast_untagged_variants. tag_type_to_user_visible_string as_payload)
15541553 (Path. name expected_typename)
15551554 | Mismatched_unboxed_payload _ -> ()
15561555 | Mismatched_as_payload {constructor_name; expected_typename; as_payload} ->
@@ -1565,7 +1564,7 @@ let print_variant_runtime_representation_issue ppf variant_name
15651564 fprintf ppf
15661565 " an @{<info>@as@} payload that gives it the runtime type of \
15671566 @{<info>%s@}."
1568- (Ast_untagged_variants. tag_type_to_string payload));
1567+ (Ast_untagged_variants. tag_type_to_user_visible_string payload));
15691568 fprintf ppf
15701569 " @ That runtime representation is not compatible with the expected \
15711570 runtime representation of @{<info>%s@}."
@@ -1704,16 +1703,15 @@ let report_subtyping_error ppf env tr1 txt1 tr2 ctx =
17041703 fprintf ppf " @,@,@[<v 2>" ;
17051704 match ctx with
17061705 | Generic {errorCode} -> fprintf ppf " Error: %s" errorCode
1707- | Primitive_coercion_target_variant_not_unboxed
1708- {variant_name; primitive} ->
1706+ | Coercion_target_variant_not_unboxed {variant_name; primitive} ->
17091707 fprintf ppf
17101708 " @ The variant @{<info>%s@} is not unboxed, so it cannot be \
17111709 coerced to a @{<info>%s@}. @ Fix this by adding the \
17121710 @{<info>@unboxed@} attribute to the variant @{<info>%s@}."
17131711 (Path. name variant_name) (Path. name primitive)
17141712 (Path. name variant_name)
1715- | Primitive_coercion_target_variant_no_catch_all
1716- {variant_name; primitive} ->
1713+ | Coercion_target_variant_does_not_cover_type {variant_name; primitive}
1714+ ->
17171715 fprintf ppf
17181716 " @ The variant @{<info>%s@} is unboxed, but has no catch-all case \
17191717 for the primitive @{<info>%s@}, and therefore does not cover all \
0 commit comments