File tree Expand file tree Collapse file tree 1 file changed +5
-2
lines changed Expand file tree Collapse file tree 1 file changed +5
-2
lines changed Original file line number Diff line number Diff line change @@ -85,7 +85,9 @@ let emit_external_warnings : iterator =
85
85
( Nonrecursive ,
86
86
[{ptype_kind = Ptype_variant ({pcd_res = Some _} :: _)}] ) ->
87
87
Location. raise_errorf ~loc: str_item.pstr_loc
88
- " GADT has to be recursive types, please try `type rec'"
88
+ " GADTs require recursive type syntax.\n \
89
+ Please define your type using `type rec` instead of `type`.\n \
90
+ Example: type rec t = ..."
89
91
| _ -> super.structure_item self str_item);
90
92
expr =
91
93
(fun self ({pexp_loc = loc } as a ) ->
@@ -95,7 +97,8 @@ let emit_external_warnings : iterator =
95
97
try ignore (Ext_string. hash_number_as_i32_exn s : int32 )
96
98
with _ ->
97
99
Location. raise_errorf ~loc
98
- " This number is too large to cause int overlow" )
100
+ " Integer literal exceeds int32 range. Use float or BigInt if \
101
+ larger values are required." )
99
102
| _ -> super.expr self a);
100
103
label_declaration =
101
104
(fun self lbl ->
You can’t perform that action at this time.
0 commit comments