Skip to content

Commit

Permalink
⬆️ - Use Rescript 11
Browse files Browse the repository at this point in the history
  • Loading branch information
rolandpeelen committed Jan 17, 2024
1 parent 06922e7 commit d100b19
Show file tree
Hide file tree
Showing 9 changed files with 22 additions and 22 deletions.
4 changes: 2 additions & 2 deletions testrepo/packages/dep01/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@
"author": "",
"license": "MIT",
"dependencies": {
"rescript": "*",
"@testrepo/dep02": "*"
"@testrepo/dep02": "*",
"rescript": "*"
}
}
4 changes: 2 additions & 2 deletions testrepo/packages/dep01/src/Dep01.mjs
Original file line number Diff line number Diff line change
Expand Up @@ -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 {
Expand Down
14 changes: 7 additions & 7 deletions testrepo/packages/dep02/src/Array.mjs
Original file line number Diff line number Diff line change
Expand Up @@ -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") {
Expand Down Expand Up @@ -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);
Expand All @@ -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]);
Expand All @@ -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;
Expand All @@ -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 ;
Expand Down Expand Up @@ -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;
Expand Down
4 changes: 2 additions & 2 deletions testrepo/packages/dep02/src/Dep02.mjs
Original file line number Diff line number Diff line change
Expand Up @@ -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"
Expand All @@ -12,7 +12,7 @@ function log(param) {
}));
}

console.log(NS_alias$$atNewNamespace.hello_world(undefined));
console.log(NS_alias$$atNewNamespace.hello_world());

export {
log ,
Expand Down
4 changes: 2 additions & 2 deletions testrepo/packages/main/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@
"author": "",
"license": "MIT",
"dependencies": {
"rescript": "*",
"@testrepo/dep01": "*"
"@testrepo/dep01": "*",
"rescript": "*"
}
}
2 changes: 1 addition & 1 deletion testrepo/packages/main/src/Main.mjs
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ import * as Dep01 from "@testrepo/dep01/src/Dep01.mjs";

console.log("01");

Dep01.log(undefined);
Dep01.log();

var $$Array;

Expand Down
4 changes: 2 additions & 2 deletions testrepo/packages/new-namespace/src/NS_alias.mjs
Original file line number Diff line number Diff line change
Expand Up @@ -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 ,
Expand Down
2 changes: 1 addition & 1 deletion testrepo/packages/new-namespace/src/Other_module.mjs
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
// Generated by ReScript, PLEASE EDIT WITH CARE


function bla(param) {
function bla() {
console.log("bla");
}

Expand Down
6 changes: 3 additions & 3 deletions testrepo/yarn.lock
Original file line number Diff line number Diff line change
Expand Up @@ -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==

0 comments on commit d100b19

Please sign in to comment.