diff --git a/CHANGELOG.md b/CHANGELOG.md index d4cfd439de..101f1d4469 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -28,6 +28,10 @@ - Fix printing of exotic JSX names https://github.com/rescript-lang/rescript-compiler/pull/6451 - Fix locations when code with `await` fails to compile (all locations would point to the internal function `unsafe_await`) https://github.com/rescript-lang/rescript-compiler/pull/6452 +#### :house: Internal + +- Remove dependency stdlib-406 -> belt. https://github.com/rescript-lang/rescript-compiler/pull/6453 + #### :nail_care: Polish - Add [`Deno`](https://deno.land/api?s=Deno) to reserved names, so that modules named `Deno` don't clash with the globally exposed `Deno` object. https://github.com/rescript-lang/rescript-compiler/pull/6428 diff --git a/jscomp/stdlib-406/release.ninja b/jscomp/stdlib-406/release.ninja index 7356eb45ba..992f90f652 100644 --- a/jscomp/stdlib-406/release.ninja +++ b/jscomp/stdlib-406/release.ninja @@ -81,9 +81,9 @@ o stdlib-406/stdLabels.cmj : cc_cmi stdlib-406/stdLabels.res | stdlib-406/arrayL o stdlib-406/stdLabels.cmi : cc stdlib-406/stdLabels.resi | stdlib-406/arrayLabels.cmi stdlib-406/bytesLabels.cmi stdlib-406/listLabels.cmi stdlib-406/pervasives.cmj stdlib-406/stringLabels.cmi $bsc others o stdlib-406/stream.cmj : cc_cmi stdlib-406/stream.res | stdlib-406/bytes.cmj stdlib-406/lazy.cmj stdlib-406/list.cmj stdlib-406/stream.cmi stdlib-406/string.cmj $bsc others o stdlib-406/stream.cmi : cc stdlib-406/stream.resi | stdlib-406/pervasives.cmj $bsc others -o stdlib-406/string.cmj : cc_cmi stdlib-406/string.res | stdlib-406/bytes.cmj stdlib-406/string.cmi $bsc others +o stdlib-406/string.cmj : cc_cmi stdlib-406/string.res | stdlib-406/array.cmj stdlib-406/bytes.cmj stdlib-406/string.cmi $bsc others o stdlib-406/string.cmi : cc stdlib-406/string.resi | stdlib-406/pervasives.cmj $bsc others -o stdlib-406/stringLabels.cmj : cc_cmi stdlib-406/stringLabels.res | stdlib-406/bytes.cmj stdlib-406/stringLabels.cmi $bsc others +o stdlib-406/stringLabels.cmj : cc_cmi stdlib-406/stringLabels.res | stdlib-406/array.cmj stdlib-406/bytes.cmj stdlib-406/stringLabels.cmi $bsc others o stdlib-406/stringLabels.cmi : cc stdlib-406/stringLabels.resi | stdlib-406/pervasives.cmj $bsc others o stdlib-406/sys.cmj : cc_cmi stdlib-406/sys.res | stdlib-406/sys.cmi $bsc others o stdlib-406/sys.cmi : cc stdlib-406/sys.resi | stdlib-406/pervasives.cmj $bsc others diff --git a/jscomp/stdlib-406/string.res b/jscomp/stdlib-406/string.res index 91ad85a2b3..a038bfdaf8 100644 --- a/jscomp/stdlib-406/string.res +++ b/jscomp/stdlib-406/string.res @@ -38,7 +38,7 @@ let blit = B.blit_string %%private(@send external join: (array, string) => string = "join") -let concat = (sep: string, xs: list) => xs->Belt_List.toArray->join(sep) +let concat = (sep: string, xs: list) => xs->Array.of_list->join(sep) /* duplicated in bytes.ml */ let iter = (f, s) => diff --git a/jscomp/stdlib-406/stringLabels.res b/jscomp/stdlib-406/stringLabels.res index 869286af09..a9ea486d14 100644 --- a/jscomp/stdlib-406/stringLabels.res +++ b/jscomp/stdlib-406/stringLabels.res @@ -38,7 +38,7 @@ let blit = (~src, ~src_pos, ~dst, ~dst_pos, ~len) => B.blit_string(src, src_pos, %%private(@send external join: (array, string) => string = "join") -let concat = (~sep: string, xs: list) => xs->Belt_List.toArray->join(sep) +let concat = (~sep: string, xs: list) => xs->Array.of_list->join(sep) /* duplicated in bytes.ml */ let iter = (~f, s) => diff --git a/jscomp/test/ext_filename_test.js b/jscomp/test/ext_filename_test.js index ac159c6afe..65c301b886 100644 --- a/jscomp/test/ext_filename_test.js +++ b/jscomp/test/ext_filename_test.js @@ -3,11 +3,11 @@ var Sys = require("../../lib/js/sys.js"); var List = require("../../lib/js/list.js"); +var $$Array = require("../../lib/js/array.js"); var Bytes = require("../../lib/js/bytes.js"); var Curry = require("../../lib/js/curry.js"); var Caml_sys = require("../../lib/js/caml_sys.js"); var Filename = require("../../lib/js/filename.js"); -var Belt_List = require("../../lib/js/belt_List.js"); var Pervasives = require("../../lib/js/pervasives.js"); var Test_literals = require("./test_literals.js"); var Ext_string_test = require("./ext_string_test.js"); @@ -115,19 +115,19 @@ function relative_path(file_or_dir_1, file_or_dir_2) { var ys = go(dir1, dir2); if (ys) { if (ys.hd === node_parent) { - return Belt_List.toArray(ys).join(node_sep); + return $$Array.of_list(ys).join(node_sep); } var xs = { hd: node_current, tl: ys }; - return Belt_List.toArray(xs).join(node_sep); + return $$Array.of_list(xs).join(node_sep); } var xs$1 = { hd: node_current, tl: ys }; - return Belt_List.toArray(xs$1).join(node_sep); + return $$Array.of_list(xs$1).join(node_sep); } function node_relative_path(node_modules_shorten, file1, dep_file) { diff --git a/jscomp/test/string_test.js b/jscomp/test/string_test.js index a759643507..2744674448 100644 --- a/jscomp/test/string_test.js +++ b/jscomp/test/string_test.js @@ -3,9 +3,9 @@ var Mt = require("./mt.js"); var List = require("../../lib/js/list.js"); +var $$Array = require("../../lib/js/array.js"); var Bytes = require("../../lib/js/bytes.js"); var $$String = require("../../lib/js/string.js"); -var Belt_List = require("../../lib/js/belt_List.js"); var Ext_string_test = require("./ext_string_test.js"); var Caml_js_exceptions = require("../../lib/js/caml_js_exceptions.js"); @@ -131,7 +131,7 @@ function string_of_chars(x) { var xs = List.map((function (prim) { return String.fromCharCode(prim); }), x); - return Belt_List.toArray(xs).join(""); + return $$Array.of_list(xs).join(""); } Mt.from_pair_suites("String_test", { diff --git a/lib/es6/string.js b/lib/es6/string.js index c9fc3629b3..def3e31195 100644 --- a/lib/es6/string.js +++ b/lib/es6/string.js @@ -1,9 +1,9 @@ import * as Caml from "./caml.js"; +import * as $$Array from "./array.js"; import * as Bytes from "./bytes.js"; import * as Curry from "./curry.js"; -import * as Belt_List from "./belt_List.js"; import * as Caml_string from "./caml_string.js"; import * as Caml_js_exceptions from "./caml_js_exceptions.js"; @@ -16,7 +16,7 @@ function sub(s, ofs, len) { } function concat(sep, xs) { - return Belt_List.toArray(xs).join(sep); + return $$Array.of_list(xs).join(sep); } function iter(f, s) { diff --git a/lib/es6/stringLabels.js b/lib/es6/stringLabels.js index e1263d5582..4b568b4ebc 100644 --- a/lib/es6/stringLabels.js +++ b/lib/es6/stringLabels.js @@ -1,9 +1,9 @@ import * as Caml from "./caml.js"; +import * as $$Array from "./array.js"; import * as Bytes from "./bytes.js"; import * as Curry from "./curry.js"; -import * as Belt_List from "./belt_List.js"; import * as Caml_string from "./caml_string.js"; import * as Caml_js_exceptions from "./caml_js_exceptions.js"; @@ -18,7 +18,7 @@ function sub(s, ofs, len) { var blit = Bytes.blit_string; function concat(sep, xs) { - return Belt_List.toArray(xs).join(sep); + return $$Array.of_list(xs).join(sep); } function iter(f, s) { diff --git a/lib/js/string.js b/lib/js/string.js index abbb4077c3..076b21a317 100644 --- a/lib/js/string.js +++ b/lib/js/string.js @@ -1,9 +1,9 @@ 'use strict'; var Caml = require("./caml.js"); +var $$Array = require("./array.js"); var Bytes = require("./bytes.js"); var Curry = require("./curry.js"); -var Belt_List = require("./belt_List.js"); var Caml_string = require("./caml_string.js"); var Caml_js_exceptions = require("./caml_js_exceptions.js"); @@ -16,7 +16,7 @@ function sub(s, ofs, len) { } function concat(sep, xs) { - return Belt_List.toArray(xs).join(sep); + return $$Array.of_list(xs).join(sep); } function iter(f, s) { diff --git a/lib/js/stringLabels.js b/lib/js/stringLabels.js index bcdea0561a..22cd4df919 100644 --- a/lib/js/stringLabels.js +++ b/lib/js/stringLabels.js @@ -1,9 +1,9 @@ 'use strict'; var Caml = require("./caml.js"); +var $$Array = require("./array.js"); var Bytes = require("./bytes.js"); var Curry = require("./curry.js"); -var Belt_List = require("./belt_List.js"); var Caml_string = require("./caml_string.js"); var Caml_js_exceptions = require("./caml_js_exceptions.js"); @@ -18,7 +18,7 @@ function sub(s, ofs, len) { var blit = Bytes.blit_string; function concat(sep, xs) { - return Belt_List.toArray(xs).join(sep); + return $$Array.of_list(xs).join(sep); } function iter(f, s) {