Skip to content

Commit 8720f85

Browse files
committed
Remove @uncurry needed to turn on uncurried for others.
1 parent dca24f3 commit 8720f85

File tree

7 files changed

+15
-21
lines changed

7 files changed

+15
-21
lines changed

jscomp/others/js_promise.res

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -44,7 +44,7 @@ type error
4444
*/
4545

4646
@new
47-
external make: ((@uncurry ~resolve: (. 'a) => unit, ~reject: (. exn) => unit) => unit) => promise<
47+
external make: ((~resolve: (. 'a) => unit, ~reject: (. exn) => unit) => unit) => promise<
4848
'a,
4949
> = "Promise"
5050

@@ -83,12 +83,12 @@ external all6: (
8383

8484
@val @scope("Promise") external race: array<promise<'a>> => promise<'a> = "race"
8585

86-
@send external then_: (promise<'a>, @uncurry ('a => promise<'b>)) => promise<'b> = "then"
86+
@send external then_: (promise<'a>, ('a => promise<'b>)) => promise<'b> = "then"
8787
let then_ = (arg1, obj) => then_(obj, arg1)
8888

8989

9090
@send
91-
external catch: (promise<'a>, @uncurry (error => promise<'a>)) => promise<'a> = "catch"
91+
external catch: (promise<'a>, (error => promise<'a>)) => promise<'a> = "catch"
9292
let catch = (arg1, obj) => catch(obj, arg1)
9393
/* ` p|> catch handler`
9494
Note in JS the returned promise type is actually runtime dependent,

jscomp/others/js_promise2.res

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@ let catch: (promise<'a>, error => promise<'a>) => promise<'a> = %raw(`
1616
`)
1717

1818
@new
19-
external make: ((@uncurry ~resolve: (. 'a) => unit, ~reject: (. exn) => unit) => unit) => promise<
19+
external make: ((~resolve: (. 'a) => unit, ~reject: (. exn) => unit) => unit) => promise<
2020
'a,
2121
> = "Promise"
2222

jscomp/test/Import.js

Lines changed: 3 additions & 5 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

jscomp/test/SafePromises.js

Lines changed: 2 additions & 3 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

jscomp/test/mt.js

Lines changed: 2 additions & 3 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

lib/es6/js_promise.js

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,13 +1,12 @@
11

22

3-
import * as Curry from "./curry.js";
43

54
function then_(arg1, obj) {
6-
return obj.then(Curry.__1(arg1));
5+
return obj.then(arg1);
76
}
87

98
function $$catch(arg1, obj) {
10-
return obj.catch(Curry.__1(arg1));
9+
return obj.catch(arg1);
1110
}
1211

1312
export {

lib/js/js_promise.js

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,13 +1,12 @@
11
'use strict';
22

3-
let Curry = require("./curry.js");
43

54
function then_(arg1, obj) {
6-
return obj.then(Curry.__1(arg1));
5+
return obj.then(arg1);
76
}
87

98
function $$catch(arg1, obj) {
10-
return obj.catch(Curry.__1(arg1));
9+
return obj.catch(arg1);
1110
}
1211

1312
exports.then_ = then_;

0 commit comments

Comments
 (0)