diff --git a/testrepo/packages/dep01/package.json b/testrepo/packages/dep01/package.json index 7f5035e..e60d809 100644 --- a/testrepo/packages/dep01/package.json +++ b/testrepo/packages/dep01/package.json @@ -12,7 +12,7 @@ "author": "", "license": "MIT", "dependencies": { - "rescript": "*", - "@testrepo/dep02": "*" + "@testrepo/dep02": "*", + "rescript": "*" } } diff --git a/testrepo/packages/dep01/src/Dep01.mjs b/testrepo/packages/dep01/src/Dep01.mjs index ea2a8df..97bd864 100644 --- a/testrepo/packages/dep01/src/Dep01.mjs +++ b/testrepo/packages/dep01/src/Dep01.mjs @@ -2,9 +2,9 @@ import * as Dep02 from "@testrepo/dep02/src/Dep02.mjs"; -function log(param) { +function log() { console.log("02"); - Dep02.log(undefined); + Dep02.log(); } export { diff --git a/testrepo/packages/dep02/src/Array.mjs b/testrepo/packages/dep02/src/Array.mjs index 4db448c..8d4a3f1 100644 --- a/testrepo/packages/dep02/src/Array.mjs +++ b/testrepo/packages/dep02/src/Array.mjs @@ -62,13 +62,13 @@ function filter(prim0, prim1) { function reject(t, fn) { return t.filter(function (el) { - return !Curry._1(fn, el); + return !fn(el); }); } function sortBy(t, fn) { return Belt_SortArray.stableSortBy(t, (function (a, b) { - var match = Curry._2(fn, a, b); + var match = fn(a, b); if (match === "greater_than") { return 1; } else if (match === "less_than") { @@ -104,7 +104,7 @@ function eqBy(_xs, _ys, fn) { if (match$1 === undefined) { return false; } - if (!Curry._2(fn, Caml_option.valFromOption(match), Caml_option.valFromOption(match$1))) { + if (!fn(Caml_option.valFromOption(match), Caml_option.valFromOption(match$1))) { return false; } _ys = Belt_Array.sliceToEnd(ys, 1); @@ -125,7 +125,7 @@ function takeWhile(t, fn) { return ; } var item = t[idx]; - if (!Curry._1(fn, item)) { + if (!fn(item)) { return ; } a.contents = Belt_Array.concat(a.contents, [item]); @@ -150,7 +150,7 @@ function distinct(t, eq) { var y = t[idx]; var acc$1 = Belt_Array.some(acc, (function(y){ return function (x) { - return Curry._2(eq, x, y); + return eq(x, y); } }(y))) ? acc : Belt_Array.concat(acc, [y]); _idx = idx + 1 | 0; @@ -176,7 +176,7 @@ function partition(t, fn) { } var item = t[idx]; var idx$1 = idx + 1 | 0; - if (Curry._1(fn, item)) { + if (fn(item)) { _idx = idx$1; _a = Belt_Array.concat(a, [item]); continue ; @@ -205,7 +205,7 @@ function indexOfBy(t, fn, value) { if (value$p === undefined) { return ; } - if (Curry._2(fn, value, Caml_option.valFromOption(value$p))) { + if (fn(value, Caml_option.valFromOption(value$p))) { return idx; } _idx = idx + 1 | 0; diff --git a/testrepo/packages/dep02/src/Dep02.mjs b/testrepo/packages/dep02/src/Dep02.mjs index 856730e..86cea08 100644 --- a/testrepo/packages/dep02/src/Dep02.mjs +++ b/testrepo/packages/dep02/src/Dep02.mjs @@ -3,7 +3,7 @@ import * as $$Array from "./Array.mjs"; import * as NS_alias$$atNewNamespace from "@testrepo/new-namespace/src/NS_alias.mjs"; -function log(param) { +function log() { $$Array.forEach([ "a", "b" @@ -12,7 +12,7 @@ function log(param) { })); } -console.log(NS_alias$$atNewNamespace.hello_world(undefined)); +console.log(NS_alias$$atNewNamespace.hello_world()); export { log , diff --git a/testrepo/packages/main/package.json b/testrepo/packages/main/package.json index 66680fb..5bf3dca 100644 --- a/testrepo/packages/main/package.json +++ b/testrepo/packages/main/package.json @@ -12,7 +12,7 @@ "author": "", "license": "MIT", "dependencies": { - "rescript": "*", - "@testrepo/dep01": "*" + "@testrepo/dep01": "*", + "rescript": "*" } } diff --git a/testrepo/packages/main/src/Main.mjs b/testrepo/packages/main/src/Main.mjs index 95eb895..887a8e6 100644 --- a/testrepo/packages/main/src/Main.mjs +++ b/testrepo/packages/main/src/Main.mjs @@ -4,7 +4,7 @@ import * as Dep01 from "@testrepo/dep01/src/Dep01.mjs"; console.log("01"); -Dep01.log(undefined); +Dep01.log(); var $$Array; diff --git a/testrepo/packages/new-namespace/src/NS_alias.mjs b/testrepo/packages/new-namespace/src/NS_alias.mjs index 7ffff5c..6ab210f 100644 --- a/testrepo/packages/new-namespace/src/NS_alias.mjs +++ b/testrepo/packages/new-namespace/src/NS_alias.mjs @@ -2,11 +2,11 @@ import * as Other_module$$atNewNamespace from "./Other_module.mjs"; -function hello_world(param) { +function hello_world() { return "Hello world"; } -Other_module$$atNewNamespace.bla(undefined); +Other_module$$atNewNamespace.bla(); export { hello_world , diff --git a/testrepo/packages/new-namespace/src/Other_module.mjs b/testrepo/packages/new-namespace/src/Other_module.mjs index dde3733..c4e5f16 100644 --- a/testrepo/packages/new-namespace/src/Other_module.mjs +++ b/testrepo/packages/new-namespace/src/Other_module.mjs @@ -1,7 +1,7 @@ // Generated by ReScript, PLEASE EDIT WITH CARE -function bla(param) { +function bla() { console.log("bla"); } diff --git a/testrepo/yarn.lock b/testrepo/yarn.lock index 80d7fbe..2a3f684 100644 --- a/testrepo/yarn.lock +++ b/testrepo/yarn.lock @@ -3,6 +3,6 @@ rescript@*: - version "10.1.2" - resolved "https://registry.yarnpkg.com/rescript/-/rescript-10.1.2.tgz#ed3b8c762d6e22139803c16e765356685693e38c" - integrity sha512-PPdhOiN+lwqxQ0qvzHc1KW0TL12LDy2X+qo/JIMIP3bMfiH0vxQH2e/lXuoutWWm04fGQGTv3hWH+gKW3/UyfA== + version "11.0.0" + resolved "https://registry.yarnpkg.com/rescript/-/rescript-11.0.0.tgz#9a0b6fc998c360543c459aba49b77a572a0306cd" + integrity sha512-uIUwDZZmDUb7ymGkBiiGioxMg8hXh1mze/2k/qhYQcZGgi7PrLHQIW9AksM7gb9WnpjCAvFsA8U2VgC0nA468w==