Skip to content

Commit d9c70e4

Browse files
committed
Remove @@uncurried.swap, which was never public.
1 parent 4fd2dca commit d9c70e4

23 files changed

+121
-326
lines changed

CHANGELOG.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -62,6 +62,7 @@
6262
- Make gentype tests uncurried. https://github.com/rescript-lang/rescript-compiler/pull/6866
6363
- Ignore `@uncurry` attribute in uncurried mode, to avoid generating calls to `Curry` at runtime. https://github.com/rescript-lang/rescript-compiler/pull/6869
6464
- Avoid generating calls to Curry when adjusting arity of uncurried functions. https://github.com/rescript-lang/rescript-compiler/pull/6870
65+
- Remove `@@uncurried.swap`, which was used for internal tests. https://github.com/rescript-lang/rescript-compiler/pull/6875
6566

6667
#### :nail_care: Polish
6768

Lines changed: 0 additions & 29 deletions
Original file line numberDiff line numberDiff line change
@@ -1,29 +0,0 @@
1-
2-
We've found a bug for you!
3-
/.../fixtures/c_for_u_in_u_mode.res:5:5-8:1
4-
5-
3 │ module Foo: {
6-
4 │ let add: (int, int) => int
7-
5 │ } = {
8-
6 │  @@uncurried.swap
9-
7 │  let add = (. a, b) => a + b
10-
8 │ }
11-
9 │
12-
13-
Signature mismatch:
14-
Modules do not match:
15-
{
16-
let add: (int, int) => int
17-
}
18-
is not included in
19-
{
20-
let add: (int, int) => int
21-
}
22-
Values do not match:
23-
let add: (int, int) => int (curried)
24-
is not included in
25-
let add: (int, int) => int (uncurried)
26-
/.../fixtures/c_for_u_in_u_mode.res:4:3-28:
27-
Expected declaration
28-
/.../fixtures/c_for_u_in_u_mode.res:7:7-9:
29-
Actual declaration
Lines changed: 0 additions & 28 deletions
Original file line numberDiff line numberDiff line change
@@ -1,28 +0,0 @@
1-
2-
We've found a bug for you!
3-
/.../fixtures/u_for_c_in_u_mode.res:6:5-8:1
4-
5-
4 │ @@uncurried.swap
6-
5 │ let add: (. int, int) => int
7-
6 │ } = {
8-
7 │  let add = (a, b) => a + b
9-
8 │ }
10-
9 │
11-
12-
Signature mismatch:
13-
Modules do not match:
14-
{
15-
let add: (int, int) => int
16-
}
17-
is not included in
18-
{
19-
let add: (int, int) => int
20-
}
21-
Values do not match:
22-
let add: (int, int) => int (uncurried)
23-
is not included in
24-
let add: (int, int) => int (curried)
25-
/.../fixtures/u_for_c_in_u_mode.res:5:3-30:
26-
Expected declaration
27-
/.../fixtures/u_for_c_in_u_mode.res:7:7-9:
28-
Actual declaration

jscomp/build_tests/super_errors/fixtures/c_for_u_in_u_mode.res

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,5 @@
33
module Foo: {
44
let add: (int, int) => int
55
} = {
6-
@@uncurried.swap
76
let add = (. a, b) => a + b
87
}

jscomp/build_tests/super_errors/fixtures/u_for_c_in_u_mode.res

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,6 @@
11
@@uncurried
22

33
module Foo: {
4-
@@uncurried.swap
54
let add: (. int, int) => int
65
} = {
76
let add = (a, b) => a + b

jscomp/ext/config.ml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@ let bs_only = ref true
1111

1212
let unsafe_empty_array = ref false
1313

14-
type uncurried = Legacy | Uncurried | Swap
14+
type uncurried = Legacy | Uncurried
1515
let uncurried = ref Legacy
1616

1717
and cmi_magic_number = "Caml1999I022"

jscomp/ext/config.mli

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -42,5 +42,5 @@ val cmt_magic_number : string
4242

4343
val print_config : out_channel -> unit
4444

45-
type uncurried = Legacy | Uncurried | Swap
45+
type uncurried = Legacy | Uncurried
4646
val uncurried : uncurried ref

jscomp/syntax/src/res_core.ml

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -6670,9 +6670,6 @@ and parse_standalone_attribute p =
66706670
let attr_id = parse_attribute_id ~start_pos p in
66716671
let attr_id =
66726672
match attr_id.txt with
6673-
| "uncurried.swap" ->
6674-
p.uncurried_config <- Config.Swap;
6675-
attr_id
66766673
| "uncurried" ->
66776674
p.uncurried_config <- Config.Uncurried;
66786675
attr_id

jscomp/syntax/src/res_printer.ml

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -5559,9 +5559,6 @@ and print_attribute ?(standalone = false) ~state
55595559
| _ ->
55605560
let id =
55615561
match id.txt with
5562-
| "uncurried.swap" ->
5563-
state.uncurried_config <- Config.Swap;
5564-
id
55655562
| "uncurried" ->
55665563
state.uncurried_config <- Config.Uncurried;
55675564
id

jscomp/syntax/src/res_uncurried.ml

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,9 @@
11
(* For parsing *)
22
let from_dotted ~dotted = function
33
| Config.Legacy -> dotted
4-
| Swap -> not dotted
54
| Uncurried -> true
65

76
(* For printing *)
87
let get_dotted ~uncurried = function
98
| Config.Legacy -> uncurried
10-
| Swap -> not uncurried
119
| Uncurried -> false

0 commit comments

Comments
 (0)