diff --git a/compiler/ml/error_message_utils.ml b/compiler/ml/error_message_utils.ml index c80295c248..819d2287d5 100644 --- a/compiler/ml/error_message_utils.ml +++ b/compiler/ml/error_message_utils.ml @@ -233,8 +233,7 @@ let type_clash_context_maybe_option ty_expected ty_res = | ( {Types.desc = Tconstr (expected_path, _, _)}, {Types.desc = Tconstr (type_path, _, _)} ) when Path.same Predef.path_option type_path - && Path.same expected_path Predef.path_option = false - && Path.same expected_path Predef.path_uncurried = false -> + && Path.same expected_path Predef.path_option = false -> Some MaybeUnwrapOption | _ -> None diff --git a/compiler/ml/predef.ml b/compiler/ml/predef.ml index f94a939d27..4f23f6b02b 100644 --- a/compiler/ml/predef.ml +++ b/compiler/ml/predef.ml @@ -63,16 +63,14 @@ and ident_unknown = ident_create "unknown" and ident_promise = ident_create "promise" -and ident_uncurried = ident_create "function$" - type test = For_sure_yes | For_sure_no | NA let type_is_builtin_path_but_option (p : Path.t) : test = match p with | Pident {stamp} when stamp = ident_option.stamp -> For_sure_no | Pident {stamp} when stamp = ident_unit.stamp -> For_sure_no - | Pident {stamp} - when stamp >= ident_int.stamp && stamp <= ident_uncurried.stamp -> + | Pident {stamp} when stamp >= ident_int.stamp && stamp <= ident_promise.stamp + -> For_sure_yes | _ -> NA @@ -110,8 +108,6 @@ and path_extension_constructor = Pident ident_extension_constructor and path_promise = Pident ident_promise -and path_uncurried = Pident ident_uncurried - let type_int = newgenty (Tconstr (path_int, [], ref Mnil)) and type_char = newgenty (Tconstr (path_char, [], ref Mnil)) @@ -233,8 +229,6 @@ and ident_some = ident_create "Some" and ident_ctor_unknown = ident_create "Unknown" -and ident_ctor_uncurried = ident_create "Function$" - let common_initial_env add_type add_extension empty_env = let decl_bool = { @@ -319,16 +313,6 @@ let common_initial_env add_type add_extension empty_env = ], Record_regular ); } - and decl_uncurried = - let tvar1 = newgenvar () in - { - decl_abstr with - type_params = [tvar1]; - type_arity = 1; - type_kind = Type_variant [cstr ident_ctor_uncurried [tvar1]]; - type_variance = [Variance.covariant]; - type_unboxed = Types.unboxed_true_default_false; - } and decl_unknown = let tvar = newgenvar () in { @@ -395,7 +379,6 @@ let common_initial_env add_type add_extension empty_env = |> add_type ident_unit decl_unit |> add_type ident_extension_constructor decl_abstr |> add_type ident_exn decl_exn - |> add_type ident_uncurried decl_uncurried |> add_type ident_option decl_option |> add_type ident_result decl_result |> add_type ident_lazy_t decl_lazy_t diff --git a/compiler/ml/predef.mli b/compiler/ml/predef.mli index 7919b802ee..7fc7243f72 100644 --- a/compiler/ml/predef.mli +++ b/compiler/ml/predef.mli @@ -51,7 +51,6 @@ val path_bigint : Path.t val path_lazy_t : Path.t val path_extension_constructor : Path.t val path_promise : Path.t -val path_uncurried : Path.t val path_match_failure : Path.t val path_assert_failure : Path.t