summaryrefslogtreecommitdiff
path: root/typing/printtyp.ml
diff options
context:
space:
mode:
authorChristiana Anthony <ofonime41@gmail.com>2022-11-08 16:25:06 +0100
committerGitHub <noreply@github.com>2022-11-08 16:25:06 +0100
commit7ed218ed01657b961116fb01463431c6019a7d00 (patch)
treed17d8fc7c434a6e8b48539b2aeb2c141d92dcbcc /typing/printtyp.ml
parentfd113a31bd07d552420b1db2e6306cdf83d52368 (diff)
downloadocaml-7ed218ed01657b961116fb01463431c6019a7d00.tar.gz
Add colors to error message hints (#11685)
Diffstat (limited to 'typing/printtyp.ml')
-rw-r--r--typing/printtyp.ml8
1 files changed, 4 insertions, 4 deletions
diff --git a/typing/printtyp.ml b/typing/printtyp.ml
index 88d67013c5..cbe7f35c15 100644
--- a/typing/printtyp.ml
+++ b/typing/printtyp.ml
@@ -172,7 +172,7 @@ module Conflicts = struct
| [namespace, a] ->
Format.fprintf ppf
"@ \
- @[<2>Hint: The %a %s has been defined multiple times@ \
+ @[<2>@{<hint>Hint@}: The %a %s has been defined multiple times@ \
in@ this@ toplevel@ session.@ \
Some toplevel values still refer to@ old@ versions@ of@ this@ %a.\
@ Did you try to redefine them?@]"
@@ -180,7 +180,7 @@ module Conflicts = struct
| (namespace, _) :: _ :: _ ->
Format.fprintf ppf
"@ \
- @[<2>Hint: The %a %a have been defined multiple times@ \
+ @[<2>@{<hint>Hint@}: The %a %a have been defined multiple times@ \
in@ this@ toplevel@ session.@ \
Some toplevel values still refer to@ old@ versions@ of@ those@ %a.\
@ Did you try to redefine them?@]"
@@ -2169,12 +2169,12 @@ let explanation_diff env t3 t4 : (Format.formatter -> unit) option =
when is_unit env ty1 && unifiable env ty2 t4 ->
Some (fun ppf ->
fprintf ppf
- "@,@[Hint: Did you forget to provide `()' as argument?@]")
+ "@,@[@{<hint>Hint@}: Did you forget to provide `()' as argument?@]")
| _, Tarrow (_, ty1, ty2, _)
when is_unit env ty1 && unifiable env t3 ty2 ->
Some (fun ppf ->
fprintf ppf
- "@,@[Hint: Did you forget to wrap the expression using \
+ "@,@[@{<hint>Hint@}: Did you forget to wrap the expression using \
`fun () ->'?@]")
| _ ->
None