Skip to content

Commit e9bc2c1

Browse files
authored
Remove leftover ident_uncurried/path_uncurried (#7467)
1 parent a538eb0 commit e9bc2c1

File tree

3 files changed

+3
-22
lines changed

3 files changed

+3
-22
lines changed

compiler/ml/error_message_utils.ml

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -233,8 +233,7 @@ let type_clash_context_maybe_option ty_expected ty_res =
233233
| ( {Types.desc = Tconstr (expected_path, _, _)},
234234
{Types.desc = Tconstr (type_path, _, _)} )
235235
when Path.same Predef.path_option type_path
236-
&& Path.same expected_path Predef.path_option = false
237-
&& Path.same expected_path Predef.path_uncurried = false ->
236+
&& Path.same expected_path Predef.path_option = false ->
238237
Some MaybeUnwrapOption
239238
| _ -> None
240239

compiler/ml/predef.ml

Lines changed: 2 additions & 19 deletions
Original file line numberDiff line numberDiff line change
@@ -63,16 +63,14 @@ and ident_unknown = ident_create "unknown"
6363

6464
and ident_promise = ident_create "promise"
6565

66-
and ident_uncurried = ident_create "function$"
67-
6866
type test = For_sure_yes | For_sure_no | NA
6967

7068
let type_is_builtin_path_but_option (p : Path.t) : test =
7169
match p with
7270
| Pident {stamp} when stamp = ident_option.stamp -> For_sure_no
7371
| Pident {stamp} when stamp = ident_unit.stamp -> For_sure_no
74-
| Pident {stamp}
75-
when stamp >= ident_int.stamp && stamp <= ident_uncurried.stamp ->
72+
| Pident {stamp} when stamp >= ident_int.stamp && stamp <= ident_promise.stamp
73+
->
7674
For_sure_yes
7775
| _ -> NA
7876

@@ -110,8 +108,6 @@ and path_extension_constructor = Pident ident_extension_constructor
110108

111109
and path_promise = Pident ident_promise
112110

113-
and path_uncurried = Pident ident_uncurried
114-
115111
let type_int = newgenty (Tconstr (path_int, [], ref Mnil))
116112

117113
and type_char = newgenty (Tconstr (path_char, [], ref Mnil))
@@ -233,8 +229,6 @@ and ident_some = ident_create "Some"
233229

234230
and ident_ctor_unknown = ident_create "Unknown"
235231

236-
and ident_ctor_uncurried = ident_create "Function$"
237-
238232
let common_initial_env add_type add_extension empty_env =
239233
let decl_bool =
240234
{
@@ -319,16 +313,6 @@ let common_initial_env add_type add_extension empty_env =
319313
],
320314
Record_regular );
321315
}
322-
and decl_uncurried =
323-
let tvar1 = newgenvar () in
324-
{
325-
decl_abstr with
326-
type_params = [tvar1];
327-
type_arity = 1;
328-
type_kind = Type_variant [cstr ident_ctor_uncurried [tvar1]];
329-
type_variance = [Variance.covariant];
330-
type_unboxed = Types.unboxed_true_default_false;
331-
}
332316
and decl_unknown =
333317
let tvar = newgenvar () in
334318
{
@@ -395,7 +379,6 @@ let common_initial_env add_type add_extension empty_env =
395379
|> add_type ident_unit decl_unit
396380
|> add_type ident_extension_constructor decl_abstr
397381
|> add_type ident_exn decl_exn
398-
|> add_type ident_uncurried decl_uncurried
399382
|> add_type ident_option decl_option
400383
|> add_type ident_result decl_result
401384
|> add_type ident_lazy_t decl_lazy_t

compiler/ml/predef.mli

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -51,7 +51,6 @@ val path_bigint : Path.t
5151
val path_lazy_t : Path.t
5252
val path_extension_constructor : Path.t
5353
val path_promise : Path.t
54-
val path_uncurried : Path.t
5554

5655
val path_match_failure : Path.t
5756
val path_assert_failure : Path.t

0 commit comments

Comments
 (0)