From 7703a43adacd64d5d1e133fe144056a87ac7c5fd Mon Sep 17 00:00:00 2001 From: Hyeseong Kim Date: Mon, 22 Jul 2024 03:50:18 +0900 Subject: [PATCH 1/2] Remove `Js.Vector` and `Js.List` Resolves #5460 --- jscomp/core/outcome_printer_ns.ml | 2 - jscomp/others/js.res | 6 - jscomp/others/js_list.res | 213 -------- jscomp/others/js_list.resi | 71 --- jscomp/others/js_vector.res | 149 ------ jscomp/others/js_vector.resi | 92 ---- jscomp/others/release.ninja | 6 +- jscomp/runtime/js.res | 6 - jscomp/test/bs_array_test.js | 429 ++++++--------- jscomp/test/bs_array_test.res | 37 -- jscomp/test/build.ninja | 3 +- jscomp/test/js_array_test.js | 832 ++++++++++++++---------------- jscomp/test/js_array_test.res | 22 - jscomp/test/js_list_test.js | 211 -------- jscomp/test/js_list_test.res | 40 -- lib/es6/belt_internalBuckets.js | 26 +- lib/es6/js.js | 6 - lib/es6/js_list.js | 333 ------------ lib/es6/js_vector.js | 134 ----- lib/js/belt_internalBuckets.js | 26 +- lib/js/js.js | 6 - lib/js/js_list.js | 331 ------------ lib/js/js_vector.js | 132 ----- packages/artifacts.txt | 16 - 24 files changed, 579 insertions(+), 2550 deletions(-) delete mode 100644 jscomp/others/js_list.res delete mode 100644 jscomp/others/js_list.resi delete mode 100644 jscomp/others/js_vector.res delete mode 100644 jscomp/others/js_vector.resi delete mode 100644 jscomp/test/js_list_test.js delete mode 100644 jscomp/test/js_list_test.res delete mode 100644 lib/es6/js_list.js delete mode 100644 lib/es6/js_vector.js delete mode 100644 lib/js/js_list.js delete mode 100644 lib/js/js_vector.js diff --git a/jscomp/core/outcome_printer_ns.ml b/jscomp/core/outcome_printer_ns.ml index 2e0c1c5521..41c68716e2 100644 --- a/jscomp/core/outcome_printer_ns.ml +++ b/jscomp/core/outcome_printer_ns.ml @@ -47,8 +47,6 @@ let out_ident ppf s = | "Js_int" -> "Js.Int" | "Js_option" -> "Js.Option" | "Js_result" -> "Js.Result" - | "Js_list" -> "Js.List" - | "Js_vector" -> "Js.Vector" (* Belt_libs *) | "Belt_Id" -> "Belt.Id" | "Belt_Array" -> "Belt.Array" diff --git a/jscomp/others/js.res b/jscomp/others/js.res index 13e64195f2..862e8a8f52 100644 --- a/jscomp/others/js.res +++ b/jscomp/others/js.res @@ -260,12 +260,6 @@ module Option = Js_option /** Define the interface for result */ module Result = Js_result -/** Provide utilities for list */ -module List = Js_list - -/** Provides bindings for JS Vector */ -module Vector = Js_vector - /** Provides bindings for console */ module Console = Js_console diff --git a/jscomp/others/js_list.res b/jscomp/others/js_list.res deleted file mode 100644 index 72c66b5590..0000000000 --- a/jscomp/others/js_list.res +++ /dev/null @@ -1,213 +0,0 @@ -/* Copyright (C) 2015-2016 Bloomberg Finance L.P. - * - * This program is free software: you can redistribute it and/or modify - * it under the terms of the GNU Lesser General Public License as published by - * the Free Software Foundation, either version 3 of the License, or - * (at your option) any later version. - * - * In addition to the permissions granted to you by the LGPL, you may combine - * or link a "work that uses the Library" with a publicly distributed version - * of this file to produce a combined library or application, then distribute - * that combined work under the terms of your choosing, with no requirement - * to comply with the obligations normally placed on you by section 4 of the - * LGPL version 3 (or the corresponding section of a later version of the LGPL - * should you choose to use a later version). - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU Lesser General Public License for more details. - * - * You should have received a copy of the GNU Lesser General Public License - * along with this program; if not, write to the Free Software - * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */ - -@@warning("-3") - -type t<'a> = list<'a> - -let rec lengthAux = (len, x) => - switch x { - | list{} => len - | list{_, ...l} => lengthAux(len + 1, l) - } - -let length = l => lengthAux(0, l) - -let cons = (x, xs) => list{x, ...xs} - -let isEmpty = x => x == list{} - -let hd = x => - switch x { - | list{} => None - | list{a, ..._} => Some(a) - } - -let tl = x => - switch x { - | list{} => None - | list{_, ...l} => Some(l) - } - -let nth = (l, n) => - if n < 0 { - None - } else { - let rec nth_aux = (l, n) => - switch l { - | list{} => None - | list{a, ...l} => - if n == 0 { - Some(a) - } else { - nth_aux(l, n - 1) - } - } - nth_aux(l, n) - } - -let rec revAppend = (l1, l2) => - switch l1 { - | list{} => l2 - | list{a, ...l} => revAppend(l, list{a, ...l2}) - } - -let rev = l => revAppend(l, list{}) - -let rec mapRevAux = (f, acc, ls) => - switch ls { - | list{} => acc - | list{a, ...l} => mapRevAux(f, list{f(. a), ...acc}, l) - } - -let mapRev = (f, ls) => mapRevAux(f, list{}, ls) - -let map = (f, ls) => rev(mapRevAux(f, list{}, ls)) - -let rec iter = (f, x) => - switch x { - | list{} => () - | list{a, ...l} => - f(. a) - iter(f, l) - } - -let rec iteri = (i, f, x) => - switch x { - | list{} => () - | list{a, ...l} => - f(. i, a) - iteri(i + 1, f, l) - } - -let iteri = (f, l) => iteri(0, f, l) - -let rec foldLeft = (f, accu, l) => - switch l { - | list{} => accu - | list{a, ...l} => foldLeft(f, f(. accu, a), l) - } - -let foldRightMaxStack = 1000 - -let rec tailLoop = (f, acc, x) => - switch x { - | list{} => acc - | list{h, ...t} => tailLoop(f, f(. h, acc), t) - } - -let foldRight = (f, l, init) => { - let rec loop = (n, x) => - switch x { - | list{} => init - | list{h, ...t} => - if n < foldRightMaxStack { - f(. h, loop(n + 1, t)) - } else { - f(. h, tailLoop(f, init, rev(t))) - } - } - - loop(0, l) -} - -let rec flattenAux = (acc, lx) => - switch lx { - | list{} => rev(acc) - | list{y, ...ys} => flattenAux(revAppend(y, acc), ys) - } - -let flatten = lx => flattenAux(list{}, lx) - -let rec filterRevAux = (f, acc, xs) => - switch xs { - | list{} => acc - | list{y, ...ys} => - switch f(. y) { - | false => filterRevAux(f, acc, ys) - | true => filterRevAux(f, list{y, ...acc}, ys) - } - } - -let filter = (f, xs) => rev(filterRevAux(f, list{}, xs)) - -let rec filterMapRevAux = (f: (. 'a) => option<'b>, acc, xs) => - switch xs { - | list{} => acc - | list{y, ...ys} => - switch f(. y) { - | None => filterMapRevAux(f, acc, ys) - | Some(z) => filterMapRevAux(f, list{z, ...acc}, ys) - } - } - -let filterMap = (f, xs) => rev(filterMapRevAux(f, list{}, xs)) - -let rec countByAux = (f, acc, xs) => - switch xs { - | list{} => acc - | list{y, ...ys} => - countByAux( - f, - if f(. y) { - acc + 1 - } else { - acc - }, - ys, - ) - } - -let countBy = (f, xs) => countByAux(f, 0, xs) - -let init = (n, f) => Js_vector.toList(Js_vector.init(n, f)) - -@new external createUnsafe: int => array<'a> = "Array" - -let toVector = xs => - switch xs { - | list{} => [] - | l => - let a = createUnsafe(length(l)) - let rec fill = (i, x) => - switch x { - | list{} => a - | list{hd, ...tl} => - Js_array2.unsafe_set(a, i, hd) - fill(i + 1, tl) - } - fill(0, l) - } - -let rec equal = (cmp, xs, ys) => - switch (xs, ys) { - | (list{}, list{}) => true - | (list{x, ...xs}, list{y, ...ys}) => - if cmp(. x, y) { - equal(cmp, xs, ys) - } else { - false - } - | (_, _) => false - } diff --git a/jscomp/others/js_list.resi b/jscomp/others/js_list.resi deleted file mode 100644 index d4c9efa3cd..0000000000 --- a/jscomp/others/js_list.resi +++ /dev/null @@ -1,71 +0,0 @@ -/* Copyright (C) 2015-2016 Bloomberg Finance L.P. - * - * This program is free software: you can redistribute it and/or modify - * it under the terms of the GNU Lesser General Public License as published by - * the Free Software Foundation, either version 3 of the License, or - * (at your option) any later version. - * - * In addition to the permissions granted to you by the LGPL, you may combine - * or link a "work that uses the Library" with a publicly distributed version - * of this file to produce a combined library or application, then distribute - * that combined work under the terms of your choosing, with no requirement - * to comply with the obligations normally placed on you by section 4 of the - * LGPL version 3 (or the corresponding section of a later version of the LGPL - * should you choose to use a later version). - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU Lesser General Public License for more details. - * - * You should have received a copy of the GNU Lesser General Public License - * along with this program; if not, write to the Free Software - * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */ - -@@deprecated("Use Belt.List instead") - -type t<'a> = list<'a> - -let length: t<'a> => int - -let cons: ('a, t<'a>) => t<'a> - -let isEmpty: t<'a> => bool - -let hd: t<'a> => option<'a> - -let tl: t<'a> => option> - -let nth: (t<'a>, int) => option<'a> - -let revAppend: (t<'a>, t<'a>) => t<'a> - -let rev: t<'a> => t<'a> - -let mapRev: ((. 'a) => 'b, t<'a>) => t<'b> - -let map: ((. 'a) => 'b, t<'a>) => t<'b> - -let iter: ((. 'a) => unit, t<'a>) => unit - -let iteri: ((. int, 'a) => unit, t<'a>) => unit - -/** Application order is left to right, tail recurisve */ -let foldLeft: ((. 'a, 'b) => 'a, 'a, list<'b>) => 'a - -/** Application order is right to left tail-recursive. */ -let foldRight: ((. 'a, 'b) => 'b, list<'a>, 'b) => 'b - -let flatten: t> => t<'a> - -let filter: ((. 'a) => bool, t<'a>) => t<'a> - -let filterMap: ((. 'a) => option<'b>, t<'a>) => t<'b> - -let countBy: ((. 'a) => bool, list<'a>) => int - -let init: (int, (. int) => 'a) => t<'a> - -let toVector: t<'a> => array<'a> - -let equal: ((. 'a, 'a) => bool, list<'a>, list<'a>) => bool diff --git a/jscomp/others/js_vector.res b/jscomp/others/js_vector.res deleted file mode 100644 index 15b1ff0945..0000000000 --- a/jscomp/others/js_vector.res +++ /dev/null @@ -1,149 +0,0 @@ -/* Copyright (C) 2015-2016 Bloomberg Finance L.P. - * - * This program is free software: you can redistribute it and/or modify - * it under the terms of the GNU Lesser General Public License as published by - * the Free Software Foundation, either version 3 of the License, or - * (at your option) any later version. - * - * In addition to the permissions granted to you by the LGPL, you may combine - * or link a "work that uses the Library" with a publicly distributed version - * of this file to produce a combined library or application, then distribute - * that combined work under the terms of your choosing, with no requirement - * to comply with the obligations normally placed on you by section 4 of the - * LGPL version 3 (or the corresponding section of a later version of the LGPL - * should you choose to use a later version). - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU Lesser General Public License for more details. - * - * You should have received a copy of the GNU Lesser General Public License - * along with this program; if not, write to the Free Software - * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */ - -type t<'a> = array<'a> - -external length: array<'a> => int = "%array_length" -external get: (array<'a>, int) => 'a = "%array_safe_get" -external set: (array<'a>, int, 'a) => unit = "%array_safe_set" -external make: (int, 'a) => array<'a> = "?make_vect" -external unsafe_get: (t<'a>, int) => 'a = "%array_unsafe_get" -external unsafe_set: (t<'a>, int, 'a) => unit = "%array_unsafe_set" - -/** -**param** a array - -**param** p predicate -*/ -let filterInPlace = (p, a) => { - let i = ref(0) - let j = ref(0) - while i.contents < Js_array2.length(a) { - let v = Js_array2.unsafe_get(a, i.contents) - if p(. v) { - Js_array2.unsafe_set(a, j.contents, v) - j.contents = j.contents + 1 - } - i.contents = i.contents + 1 - } - Js_array2.removeFromInPlace(a, ~pos=j.contents)->ignore -} - -let empty = a => Js_array2.removeFromInPlace(a, ~pos=0)->ignore - -let pushBack = (x, xs) => Js_array2.push(xs, x)->ignore - -/** Find by JS (===) equality */ -let memByRef = (x, xs) => Js_array2.indexOf(xs, x) >= 0 - -let iter = (f, xs) => - for i in 0 to Js_array2.length(xs) - 1 { - f(. Js_array2.unsafe_get(xs, i)) - } - -let iteri = (f, a) => - for i in 0 to length(a) - 1 { - f(. i, unsafe_get(a, i)) - } - -@new external createUnsafe: int => t<'a> = "Array" - -/* let ofList xs = */ -/* match xs with */ -/* | [] -> [||] */ -/* | l -> */ -/* let a = createUnsafe (Js_list.length l) in */ -/* let rec fill i = function */ -/* | [] -> a */ -/* | hd::tl -> Array.unsafe_set a i hd; fill (i+1) tl in */ -/* fill 0 l */ - -let toList = a => { - let rec tolist = (i, res) => - if i < 0 { - res - } else { - tolist(i - 1, list{unsafe_get(a, i), ...res}) - } - tolist(length(a) - 1, list{}) -} - -let init = (n, f) => { - let v = createUnsafe(n) - for i in 0 to n - 1 { - unsafe_set(v, i, f(. i)) - } - v -} - -let copy = x => { - let len = length(x) - let b = createUnsafe(len) - for i in 0 to len - 1 { - unsafe_set(b, i, unsafe_get(x, i)) - } - b -} - -let map = (f, a) => { - let l = Js_array2.length(a) - let r = createUnsafe(l) - for i in 0 to l - 1 { - unsafe_set(r, i, f(. unsafe_get(a, i))) - } - r -} - -let foldLeft = (f, x, a) => { - let r = ref(x) - for i in 0 to length(a) - 1 { - r.contents = f(. r.contents, unsafe_get(a, i)) - } - r.contents -} - -let foldRight = (f, a, x) => { - let r = ref(x) - for i in length(a) - 1 downto 0 { - r.contents = f(. unsafe_get(a, i), r.contents) - } - r.contents -} - -let mapi = (f, a) => { - let l = length(a) - if l == 0 { - [] - } else { - let r = createUnsafe(l) - for i in 0 to l - 1 { - unsafe_set(r, i, f(. i, unsafe_get(a, i))) - } - r - } -} - -let append = (x, a) => Js_array2.concat(a, [x]) - -/* TODO: add `append` */ diff --git a/jscomp/others/js_vector.resi b/jscomp/others/js_vector.resi deleted file mode 100644 index 6218e9abd1..0000000000 --- a/jscomp/others/js_vector.resi +++ /dev/null @@ -1,92 +0,0 @@ -/* Copyright (C) 2015-2016 Bloomberg Finance L.P. - * - * This program is free software: you can redistribute it and/or modify - * it under the terms of the GNU Lesser General Public License as published by - * the Free Software Foundation, either version 3 of the License, or - * (at your option) any later version. - * - * In addition to the permissions granted to you by the LGPL, you may combine - * or link a "work that uses the Library" with a publicly distributed version - * of this file to produce a combined library or application, then distribute - * that combined work under the terms of your choosing, with no requirement - * to comply with the obligations normally placed on you by section 4 of the - * LGPL version 3 (or the corresponding section of a later version of the LGPL - * should you choose to use a later version). - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU Lesser General Public License for more details. - * - * You should have received a copy of the GNU Lesser General Public License - * along with this program; if not, write to the Free Software - * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */ - -@@deprecated("Use Belt.Array instead") - -type t<'a> = array<'a> - -let filterInPlace: ((. 'a) => bool, t<'a>) => unit -let empty: t<'a> => unit -let pushBack: ('a, t<'a>) => unit - -/** shallow copy */ -let copy: t<'a> => t<'a> - -let memByRef: ('a, t<'a>) => bool -let iter: ((. 'a) => unit, t<'a>) => unit -let iteri: ((. int, 'a) => unit, t<'a>) => unit - -/* [@@deprecated "Use Js.List.toVector instead"] */ -/* val ofList : 'a list -> 'a t */ -/* removed, we choose that [`Js.List`]() depends on Vector to avoid cylic dependency - */ - -let toList: t<'a> => list<'a> -let map: ((. 'a) => 'b, t<'a>) => t<'b> -let mapi: ((. int, 'a) => 'b, t<'a>) => t<'b> -let foldLeft: ((. 'a, 'b) => 'a, 'a, t<'b>) => 'a -let foldRight: ((. 'b, 'a) => 'a, t<'b>, 'a) => 'a - -/** Return the length (number of elements) of the given array. */ -external length: t<'a> => int = "%array_length" - -/** -`Vector.get(a, n)` returns the element number `n` of vector `a`. The first -element has number 0. The last element has number `Vector.length(a) - 1`. You -can also write `a[n]` instead of `Vector.get(a, n)`. Raise `Invalid_argument -"index out of bounds"` if `n` is outside the range 0 to (`Array.length(a) - -1`). -*/ -external get: (t<'a>, int) => 'a = "%array_safe_get" - -/** -`Vector.set(a, n, x)` modifies vector `a` in place, replacing element number -`n` with `x`. Raise `Invalid_argument "index out of bounds"` if `n` is outside -the range 0 to `Array.length(a) - 1`. -*/ -external set: (t<'a>, int, 'a) => unit = "%array_safe_set" - -/** -`Vector.make(n, x)` returns a fresh vector of length `n`, initialized with `x`. -All the elements of this new vector are initially physically equal to `x` (in -the sense of the `==` predicate). Consequently, if `x` is mutable, it is shared -among all elements of the array, and modifying `x` through one of the array -entries will modify all other entries at the same time. Raise -`Invalid_argument` if `n < 0` or `n > Sys.max_array_length`. If the value of -`x` is a floating-point number, then the maximum size is only -`Sys.max_array_length / 2`. -*/ -external make: (int, 'a) => t<'a> = "?make_vect" - -/** -Raises `RangeError` when n is negative. -n : size -*/ -let init: (int, (. int) => 'a) => t<'a> - -/** `append(x, a)` returns a fresh vector with `x` appended to `a`. */ -let append: ('a, t<'a>) => t<'a> - -external unsafe_get: (t<'a>, int) => 'a = "%array_unsafe_get" -external unsafe_set: (t<'a>, int, 'a) => unit = "%array_unsafe_set" diff --git a/jscomp/others/release.ninja b/jscomp/others/release.ninja index 7f1b0e83cc..691a688422 100644 --- a/jscomp/others/release.ninja +++ b/jscomp/others/release.ninja @@ -34,8 +34,6 @@ o others/js_global.cmi others/js_global.cmj : cc others/js_global.res | others/b o others/js_int.cmi others/js_int.cmj : cc others/js_int.res | others/belt_internals.cmi others/js.cmi $bsc o others/js_json.cmj : cc_cmi others/js_json.res | others/belt_internals.cmi others/js.cmi others/js_array2.cmj others/js_dict.cmj others/js_json.cmi others/js_string.cmj others/js_types.cmj $bsc o others/js_json.cmi : cc others/js_json.resi | others/belt_internals.cmi others/js.cmi others/js_dict.cmi others/js_null.cmi others/js_string.cmj others/js_types.cmi $bsc -o others/js_list.cmj : cc_cmi others/js_list.res | others/belt_internals.cmi others/js.cmi others/js_array2.cmj others/js_list.cmi others/js_vector.cmj $bsc -o others/js_list.cmi : cc others/js_list.resi | others/belt_internals.cmi others/js.cmi $bsc o others/js_map.cmi others/js_map.cmj : cc others/js_map.res | others/belt_internals.cmi others/js.cmi $bsc o others/js_math.cmi others/js_math.cmj : cc others/js_math.res | others/belt_internals.cmi others/js.cmi others/js_int.cmj $bsc o others/js_null.cmj : cc_cmi others/js_null.res | others/belt_internals.cmi others/js.cmi others/js_exn.cmj others/js_null.cmi $bsc @@ -59,8 +57,6 @@ o others/js_types.cmj : cc_cmi others/js_types.res | others/belt_internals.cmi o o others/js_types.cmi : cc others/js_types.resi | others/belt_internals.cmi others/js.cmi $bsc o others/js_undefined.cmj : cc_cmi others/js_undefined.res | others/belt_internals.cmi others/js.cmi others/js_exn.cmj others/js_undefined.cmi $bsc o others/js_undefined.cmi : cc others/js_undefined.resi | others/belt_internals.cmi others/js.cmi $bsc -o others/js_vector.cmj : cc_cmi others/js_vector.res | others/belt_internals.cmi others/js.cmi others/js_array2.cmj others/js_vector.cmi $bsc -o others/js_vector.cmi : cc others/js_vector.resi | others/belt_internals.cmi others/js.cmi $bsc o others/js_weakmap.cmi others/js_weakmap.cmj : cc others/js_weakmap.res | others/belt_internals.cmi others/js.cmi $bsc o others/js_weakset.cmi others/js_weakset.cmj : cc others/js_weakset.res | others/belt_internals.cmi others/js.cmi $bsc o others/jsx.cmi others/jsx.cmj : cc others/jsx.res | others/belt_internals.cmi others/js.cmi $bsc @@ -68,7 +64,7 @@ o others/jsxDOM.cmi others/jsxDOM.cmj : cc others/jsxDOM.res | others/belt_inter o others/jsxDOMStyle.cmi others/jsxDOMStyle.cmj : cc others/jsxDOMStyle.res | others/belt_internals.cmi others/js.cmi $bsc o others/jsxEvent.cmi others/jsxEvent.cmj : cc others/jsxEvent.res | others/belt_internals.cmi others/js.cmi $bsc o others/jsxPPXReactSupport.cmi others/jsxPPXReactSupport.cmj : cc others/jsxPPXReactSupport.res | others/belt_internals.cmi others/js.cmi others/jsx.cmj $bsc -o js_pkg : phony others/js_OO.cmi others/js_OO.cmj others/js_array.cmi others/js_array.cmj others/js_array2.cmi others/js_array2.cmj others/js_bigint.cmi others/js_bigint.cmj others/js_blob.cmi others/js_blob.cmj others/js_cast.cmi others/js_cast.cmj others/js_console.cmi others/js_console.cmj others/js_date.cmi others/js_date.cmj others/js_dict.cmi others/js_dict.cmj others/js_exn.cmi others/js_exn.cmj others/js_file.cmi others/js_file.cmj others/js_float.cmi others/js_float.cmj others/js_global.cmi others/js_global.cmj others/js_int.cmi others/js_int.cmj others/js_json.cmi others/js_json.cmj others/js_list.cmi others/js_list.cmj others/js_map.cmi others/js_map.cmj others/js_math.cmi others/js_math.cmj others/js_null.cmi others/js_null.cmj others/js_null_undefined.cmi others/js_null_undefined.cmj others/js_obj.cmi others/js_obj.cmj others/js_option.cmi others/js_option.cmj others/js_promise.cmi others/js_promise.cmj others/js_promise2.cmi others/js_promise2.cmj others/js_re.cmi others/js_re.cmj others/js_result.cmi others/js_result.cmj others/js_set.cmi others/js_set.cmj others/js_string.cmi others/js_string.cmj others/js_string2.cmi others/js_string2.cmj others/js_typed_array.cmi others/js_typed_array.cmj others/js_typed_array2.cmi others/js_typed_array2.cmj others/js_types.cmi others/js_types.cmj others/js_undefined.cmi others/js_undefined.cmj others/js_vector.cmi others/js_vector.cmj others/js_weakmap.cmi others/js_weakmap.cmj others/js_weakset.cmi others/js_weakset.cmj others/jsx.cmi others/jsx.cmj others/jsxDOM.cmi others/jsxDOM.cmj others/jsxDOMStyle.cmi others/jsxDOMStyle.cmj others/jsxEvent.cmi others/jsxEvent.cmj others/jsxPPXReactSupport.cmi others/jsxPPXReactSupport.cmj +o js_pkg : phony others/js_OO.cmi others/js_OO.cmj others/js_array.cmi others/js_array.cmj others/js_array2.cmi others/js_array2.cmj others/js_bigint.cmi others/js_bigint.cmj others/js_blob.cmi others/js_blob.cmj others/js_cast.cmi others/js_cast.cmj others/js_console.cmi others/js_console.cmj others/js_date.cmi others/js_date.cmj others/js_dict.cmi others/js_dict.cmj others/js_exn.cmi others/js_exn.cmj others/js_file.cmi others/js_file.cmj others/js_float.cmi others/js_float.cmj others/js_global.cmi others/js_global.cmj others/js_int.cmi others/js_int.cmj others/js_json.cmi others/js_json.cmj others/js_map.cmi others/js_map.cmj others/js_math.cmi others/js_math.cmj others/js_null.cmi others/js_null.cmj others/js_null_undefined.cmi others/js_null_undefined.cmj others/js_obj.cmi others/js_obj.cmj others/js_option.cmi others/js_option.cmj others/js_promise.cmi others/js_promise.cmj others/js_promise2.cmi others/js_promise2.cmj others/js_re.cmi others/js_re.cmj others/js_result.cmi others/js_result.cmj others/js_set.cmi others/js_set.cmj others/js_string.cmi others/js_string.cmj others/js_string2.cmi others/js_string2.cmj others/js_typed_array.cmi others/js_typed_array.cmj others/js_typed_array2.cmi others/js_typed_array2.cmj others/js_types.cmi others/js_types.cmj others/js_undefined.cmi others/js_undefined.cmj others/js_weakmap.cmi others/js_weakmap.cmj others/js_weakset.cmi others/js_weakset.cmj others/jsx.cmi others/jsx.cmj others/jsxDOM.cmi others/jsxDOM.cmj others/jsxDOMStyle.cmi others/jsxDOMStyle.cmj others/jsxEvent.cmi others/jsxEvent.cmj others/jsxPPXReactSupport.cmi others/jsxPPXReactSupport.cmj o others/belt_Array.cmj : cc_cmi others/belt_Array.res | others/belt.cmi others/belt_Array.cmi others/belt_internals.cmi others/js.cmi $bsc js_pkg o others/belt_Array.cmi : cc others/belt_Array.resi | others/belt_internals.cmi others/js.cmi $bsc o others/belt_Float.cmj : cc_cmi others/belt_Float.res | others/belt.cmi others/belt_Float.cmi others/belt_internals.cmi others/js.cmi $bsc js_pkg diff --git a/jscomp/runtime/js.res b/jscomp/runtime/js.res index aebbff2f14..8356872162 100644 --- a/jscomp/runtime/js.res +++ b/jscomp/runtime/js.res @@ -260,12 +260,6 @@ module Option = Js_option /** Define the interface for result */ module Result = Js_result -/** Provide utilities for list */ -module List = Js_list - -/** Provides bindings for JS Vector */ -module Vector = Js_vector - /** Provides bindings for console */ module Console = Js_console diff --git a/jscomp/test/bs_array_test.js b/jscomp/test/bs_array_test.js index e34425f2ae..9190d85d7f 100644 --- a/jscomp/test/bs_array_test.js +++ b/jscomp/test/bs_array_test.js @@ -3,12 +3,9 @@ let Mt = require("./mt.js"); let Caml = require("../../lib/js/caml.js"); -let Js_list = require("../../lib/js/js_list.js"); let Caml_obj = require("../../lib/js/caml_obj.js"); let Belt_List = require("../../lib/js/belt_List.js"); -let Js_vector = require("../../lib/js/js_vector.js"); let Belt_Array = require("../../lib/js/belt_Array.js"); -let Caml_array = require("../../lib/js/caml_array.js"); let suites = { contents: /* [] */0 @@ -185,116 +182,6 @@ let v$4 = [ b("File \"bs_array_test.res\", line 72, characters 4-11", (Belt_Array.setExn(v$4, 1, 0), Belt_Array.getExn(v$4, 1) === 0)); -function id(x) { - eq("File \"bs_array_test.res\", line 81, characters 17-24", Js_vector.toList(Js_list.toVector(x)), x); -} - -eq("File \"bs_array_test.res\", line 84, characters 5-12", Js_list.toVector({ - hd: 1, - tl: { - hd: 2, - tl: { - hd: 3, - tl: /* [] */0 - } - } -}), [ - 1, - 2, - 3 -]); - -eq("File \"bs_array_test.res\", line 85, characters 5-12", Js_vector.map((function (x) { - return x + 1 | 0; -}), [ - 1, - 2, - 3 -]), [ - 2, - 3, - 4 -]); - -eq("File \"bs_array_test.res\", line 86, characters 5-12", Caml_array.make(5, 3), [ - 3, - 3, - 3, - 3, - 3 -]); - -let a = Js_vector.init(5, (function (i) { - return i + 1 | 0; -})); - -eq("File \"bs_array_test.res\", line 88, characters 4-11", (Js_vector.filterInPlace((function (j) { - return j % 2 === 0; -}), a), a), [ - 2, - 4 -]); - -let a$1 = Js_vector.init(5, (function (i) { - return i + 1 | 0; -})); - -eq("File \"bs_array_test.res\", line 98, characters 4-11", (Js_vector.filterInPlace((function (j) { - return j % 2 !== 0; -}), a$1), a$1), [ - 1, - 3, - 5 -]); - -eq("File \"bs_array_test.res\", line 107, characters 5-12", Js_list.toVector({ - hd: 1, - tl: { - hd: 2, - tl: { - hd: 3, - tl: /* [] */0 - } - } -}), [ - 1, - 2, - 3 -]); - -eq("File \"bs_array_test.res\", line 108, characters 5-12", Js_list.toVector({ - hd: 1, - tl: /* [] */0 -}), [1]); - -id(/* [] */0); - -id({ - hd: 1, - tl: /* [] */0 -}); - -id({ - hd: 1, - tl: { - hd: 2, - tl: { - hd: 3, - tl: { - hd: 4, - tl: { - hd: 5, - tl: /* [] */0 - } - } - } - } -}); - -id(Js_vector.toList(Js_vector.init(100, (function (i) { - return i; -})))); - function add(x, y) { return x + y | 0; } @@ -305,33 +192,33 @@ let v$5 = Belt_Array.makeBy(3000, (function (i) { let u = Belt_Array.shuffle(v$5); -neq("File \"bs_array_test.res\", line 122, characters 6-13", u, v$5); +neq("File \"bs_array_test.res\", line 85, characters 6-13", u, v$5); function sum(x) { return Belt_Array.reduce(x, 0, add); } -eq("File \"bs_array_test.res\", line 124, characters 5-12", sum(u), sum(v$5)); +eq("File \"bs_array_test.res\", line 87, characters 5-12", sum(u), sum(v$5)); -b("File \"bs_array_test.res\", line 129, characters 4-11", Caml_obj.equal(Belt_Array.range(0, 3), [ +b("File \"bs_array_test.res\", line 92, characters 4-11", Caml_obj.equal(Belt_Array.range(0, 3), [ 0, 1, 2, 3 ])); -b("File \"bs_array_test.res\", line 130, characters 4-11", Caml_obj.equal(Belt_Array.range(3, 0), [])); +b("File \"bs_array_test.res\", line 93, characters 4-11", Caml_obj.equal(Belt_Array.range(3, 0), [])); -b("File \"bs_array_test.res\", line 131, characters 4-11", Caml_obj.equal(Belt_Array.range(3, 3), [3])); +b("File \"bs_array_test.res\", line 94, characters 4-11", Caml_obj.equal(Belt_Array.range(3, 3), [3])); -b("File \"bs_array_test.res\", line 133, characters 4-11", Caml_obj.equal(Belt_Array.rangeBy(0, 10, 3), [ +b("File \"bs_array_test.res\", line 96, characters 4-11", Caml_obj.equal(Belt_Array.rangeBy(0, 10, 3), [ 0, 3, 6, 9 ])); -b("File \"bs_array_test.res\", line 134, characters 4-11", Caml_obj.equal(Belt_Array.rangeBy(0, 12, 3), [ +b("File \"bs_array_test.res\", line 97, characters 4-11", Caml_obj.equal(Belt_Array.rangeBy(0, 12, 3), [ 0, 3, 6, @@ -339,28 +226,28 @@ b("File \"bs_array_test.res\", line 134, characters 4-11", Caml_obj.equal(Belt_A 12 ])); -b("File \"bs_array_test.res\", line 135, characters 4-11", Caml_obj.equal(Belt_Array.rangeBy(33, 0, 1), [])); +b("File \"bs_array_test.res\", line 98, characters 4-11", Caml_obj.equal(Belt_Array.rangeBy(33, 0, 1), [])); -b("File \"bs_array_test.res\", line 136, characters 4-11", Caml_obj.equal(Belt_Array.rangeBy(33, 0, -1), [])); +b("File \"bs_array_test.res\", line 99, characters 4-11", Caml_obj.equal(Belt_Array.rangeBy(33, 0, -1), [])); -b("File \"bs_array_test.res\", line 137, characters 4-11", Caml_obj.equal(Belt_Array.rangeBy(3, 12, -1), [])); +b("File \"bs_array_test.res\", line 100, characters 4-11", Caml_obj.equal(Belt_Array.rangeBy(3, 12, -1), [])); -b("File \"bs_array_test.res\", line 138, characters 4-11", Caml_obj.equal(Belt_Array.rangeBy(3, 3, 0), [])); +b("File \"bs_array_test.res\", line 101, characters 4-11", Caml_obj.equal(Belt_Array.rangeBy(3, 3, 0), [])); -b("File \"bs_array_test.res\", line 139, characters 4-11", Caml_obj.equal(Belt_Array.rangeBy(3, 3, 1), [3])); +b("File \"bs_array_test.res\", line 102, characters 4-11", Caml_obj.equal(Belt_Array.rangeBy(3, 3, 1), [3])); -eq("File \"bs_array_test.res\", line 143, characters 5-12", Belt_Array.reduceReverse([], 100, (function (prim0, prim1) { +eq("File \"bs_array_test.res\", line 106, characters 5-12", Belt_Array.reduceReverse([], 100, (function (prim0, prim1) { return prim0 - prim1 | 0; })), 100); -eq("File \"bs_array_test.res\", line 144, characters 5-12", Belt_Array.reduceReverse([ +eq("File \"bs_array_test.res\", line 107, characters 5-12", Belt_Array.reduceReverse([ 1, 2 ], 100, (function (prim0, prim1) { return prim0 - prim1 | 0; })), 97); -eq("File \"bs_array_test.res\", line 145, characters 5-12", Belt_Array.reduceReverse([ +eq("File \"bs_array_test.res\", line 108, characters 5-12", Belt_Array.reduceReverse([ 1, 2, 3, @@ -369,7 +256,7 @@ eq("File \"bs_array_test.res\", line 145, characters 5-12", Belt_Array.reduceRev return prim0 - prim1 | 0; })), 90); -eq("File \"bs_array_test.res\", line 146, characters 5-12", Belt_Array.reduceWithIndex([ +eq("File \"bs_array_test.res\", line 109, characters 5-12", Belt_Array.reduceWithIndex([ 1, 2, 3, @@ -378,7 +265,7 @@ eq("File \"bs_array_test.res\", line 146, characters 5-12", Belt_Array.reduceWit return (acc + x | 0) + i | 0; })), 16); -b("File \"bs_array_test.res\", line 147, characters 4-11", Belt_Array.reduceReverse2([ +b("File \"bs_array_test.res\", line 110, characters 4-11", Belt_Array.reduceReverse2([ 1, 2, 3 @@ -400,7 +287,7 @@ function makeMatrixExn(sx, sy, init) { RE_EXN_ID: "Assert_failure", _1: [ "bs_array_test.res", - 153, + 116, 2 ] } @@ -417,11 +304,11 @@ function makeMatrixExn(sx, sy, init) { return res; } -eq("File \"bs_array_test.res\", line 166, characters 5-12", Belt_Array.makeBy(0, (function (param) { +eq("File \"bs_array_test.res\", line 129, characters 5-12", Belt_Array.makeBy(0, (function (param) { return 1; })), []); -eq("File \"bs_array_test.res\", line 167, characters 5-12", Belt_Array.makeBy(3, (function (i) { +eq("File \"bs_array_test.res\", line 130, characters 5-12", Belt_Array.makeBy(3, (function (i) { return i; })), [ 0, @@ -429,7 +316,7 @@ eq("File \"bs_array_test.res\", line 167, characters 5-12", Belt_Array.makeBy(3, 2 ]); -eq("File \"bs_array_test.res\", line 168, characters 5-12", makeMatrixExn(3, 4, 1), [ +eq("File \"bs_array_test.res\", line 131, characters 5-12", makeMatrixExn(3, 4, 1), [ [ 1, 1, @@ -450,25 +337,25 @@ eq("File \"bs_array_test.res\", line 168, characters 5-12", makeMatrixExn(3, 4, ] ]); -eq("File \"bs_array_test.res\", line 169, characters 5-12", makeMatrixExn(3, 0, 0), [ +eq("File \"bs_array_test.res\", line 132, characters 5-12", makeMatrixExn(3, 0, 0), [ [], [], [] ]); -eq("File \"bs_array_test.res\", line 170, characters 5-12", makeMatrixExn(0, 3, 1), []); +eq("File \"bs_array_test.res\", line 133, characters 5-12", makeMatrixExn(0, 3, 1), []); -eq("File \"bs_array_test.res\", line 171, characters 5-12", makeMatrixExn(1, 1, 1), [[1]]); +eq("File \"bs_array_test.res\", line 134, characters 5-12", makeMatrixExn(1, 1, 1), [[1]]); -eq("File \"bs_array_test.res\", line 172, characters 5-12", [].slice(0), []); +eq("File \"bs_array_test.res\", line 135, characters 5-12", [].slice(0), []); -eq("File \"bs_array_test.res\", line 173, characters 5-12", Belt_Array.map([], (function (prim) { +eq("File \"bs_array_test.res\", line 136, characters 5-12", Belt_Array.map([], (function (prim) { return prim + 1 | 0; })), []); -eq("File \"bs_array_test.res\", line 174, characters 5-12", Belt_Array.mapWithIndex([], add), []); +eq("File \"bs_array_test.res\", line 137, characters 5-12", Belt_Array.mapWithIndex([], add), []); -eq("File \"bs_array_test.res\", line 175, characters 5-12", Belt_Array.mapWithIndex([ +eq("File \"bs_array_test.res\", line 138, characters 5-12", Belt_Array.mapWithIndex([ 1, 2, 3 @@ -478,14 +365,14 @@ eq("File \"bs_array_test.res\", line 175, characters 5-12", Belt_Array.mapWithIn 5 ]); -eq("File \"bs_array_test.res\", line 176, characters 5-12", Belt_List.fromArray([]), /* [] */0); +eq("File \"bs_array_test.res\", line 139, characters 5-12", Belt_List.fromArray([]), /* [] */0); -eq("File \"bs_array_test.res\", line 177, characters 5-12", Belt_List.fromArray([1]), { +eq("File \"bs_array_test.res\", line 140, characters 5-12", Belt_List.fromArray([1]), { hd: 1, tl: /* [] */0 }); -eq("File \"bs_array_test.res\", line 178, characters 5-12", Belt_List.fromArray([ +eq("File \"bs_array_test.res\", line 141, characters 5-12", Belt_List.fromArray([ 1, 2, 3 @@ -500,7 +387,7 @@ eq("File \"bs_array_test.res\", line 178, characters 5-12", Belt_List.fromArray( } }); -eq("File \"bs_array_test.res\", line 179, characters 5-12", Belt_Array.map([ +eq("File \"bs_array_test.res\", line 142, characters 5-12", Belt_Array.map([ 1, 2, 3 @@ -512,14 +399,14 @@ eq("File \"bs_array_test.res\", line 179, characters 5-12", Belt_Array.map([ 4 ]); -eq("File \"bs_array_test.res\", line 180, characters 5-12", Belt_List.toArray(/* [] */0), []); +eq("File \"bs_array_test.res\", line 143, characters 5-12", Belt_List.toArray(/* [] */0), []); -eq("File \"bs_array_test.res\", line 181, characters 5-12", Belt_List.toArray({ +eq("File \"bs_array_test.res\", line 144, characters 5-12", Belt_List.toArray({ hd: 1, tl: /* [] */0 }), [1]); -eq("File \"bs_array_test.res\", line 182, characters 5-12", Belt_List.toArray({ +eq("File \"bs_array_test.res\", line 145, characters 5-12", Belt_List.toArray({ hd: 1, tl: { hd: 2, @@ -530,7 +417,7 @@ eq("File \"bs_array_test.res\", line 182, characters 5-12", Belt_List.toArray({ 2 ]); -eq("File \"bs_array_test.res\", line 183, characters 5-12", Belt_List.toArray({ +eq("File \"bs_array_test.res\", line 146, characters 5-12", Belt_List.toArray({ hd: 1, tl: { hd: 2, @@ -564,7 +451,7 @@ let v2 = Belt_Array.keepMap(v$6, (function (x) { })); -eq("File \"bs_array_test.res\", line 197, characters 5-12", v0, [ +eq("File \"bs_array_test.res\", line 160, characters 5-12", v0, [ 0, 2, 4, @@ -572,14 +459,14 @@ eq("File \"bs_array_test.res\", line 197, characters 5-12", v0, [ 8 ]); -eq("File \"bs_array_test.res\", line 198, characters 5-12", v1, [ +eq("File \"bs_array_test.res\", line 161, characters 5-12", v1, [ 0, 3, 6, 9 ]); -eq("File \"bs_array_test.res\", line 199, characters 5-12", v2, [ +eq("File \"bs_array_test.res\", line 162, characters 5-12", v2, [ 1, 3, 5, @@ -587,7 +474,7 @@ eq("File \"bs_array_test.res\", line 199, characters 5-12", v2, [ 9 ]); -let a$2 = [ +let a = [ 1, 2, 3, @@ -595,28 +482,28 @@ let a$2 = [ 5 ]; -let match = Belt_Array.partition(a$2, (function (x) { +let match = Belt_Array.partition(a, (function (x) { return x % 2 === 0; })); -eq("File \"bs_array_test.res\", line 205, characters 5-12", match[0], [ +eq("File \"bs_array_test.res\", line 168, characters 5-12", match[0], [ 2, 4 ]); -eq("File \"bs_array_test.res\", line 206, characters 5-12", match[1], [ +eq("File \"bs_array_test.res\", line 169, characters 5-12", match[1], [ 1, 3, 5 ]); -let match$1 = Belt_Array.partition(a$2, (function (x) { +let match$1 = Belt_Array.partition(a, (function (x) { return x === 2; })); -eq("File \"bs_array_test.res\", line 208, characters 5-12", match$1[0], [2]); +eq("File \"bs_array_test.res\", line 171, characters 5-12", match$1[0], [2]); -eq("File \"bs_array_test.res\", line 209, characters 5-12", match$1[1], [ +eq("File \"bs_array_test.res\", line 172, characters 5-12", match$1[1], [ 1, 3, 4, @@ -627,11 +514,11 @@ let match$2 = Belt_Array.partition([], (function (x) { return false; })); -eq("File \"bs_array_test.res\", line 211, characters 5-12", match$2[0], []); +eq("File \"bs_array_test.res\", line 174, characters 5-12", match$2[0], []); -eq("File \"bs_array_test.res\", line 212, characters 5-12", match$2[1], []); +eq("File \"bs_array_test.res\", line 175, characters 5-12", match$2[1], []); -let a$3 = [ +let a$1 = [ 1, 2, 3, @@ -639,12 +526,12 @@ let a$3 = [ 5 ]; -eq("File \"bs_array_test.res\", line 217, characters 5-12", Belt_Array.slice(a$3, 0, 2), [ +eq("File \"bs_array_test.res\", line 180, characters 5-12", Belt_Array.slice(a$1, 0, 2), [ 1, 2 ]); -eq("File \"bs_array_test.res\", line 218, characters 5-12", Belt_Array.slice(a$3, 0, 5), [ +eq("File \"bs_array_test.res\", line 181, characters 5-12", Belt_Array.slice(a$1, 0, 5), [ 1, 2, 3, @@ -652,7 +539,7 @@ eq("File \"bs_array_test.res\", line 218, characters 5-12", Belt_Array.slice(a$3 5 ]); -eq("File \"bs_array_test.res\", line 219, characters 5-12", Belt_Array.slice(a$3, 0, 15), [ +eq("File \"bs_array_test.res\", line 182, characters 5-12", Belt_Array.slice(a$1, 0, 15), [ 1, 2, 3, @@ -660,40 +547,40 @@ eq("File \"bs_array_test.res\", line 219, characters 5-12", Belt_Array.slice(a$3 5 ]); -eq("File \"bs_array_test.res\", line 220, characters 5-12", Belt_Array.slice(a$3, 5, 1), []); +eq("File \"bs_array_test.res\", line 183, characters 5-12", Belt_Array.slice(a$1, 5, 1), []); -eq("File \"bs_array_test.res\", line 221, characters 5-12", Belt_Array.slice(a$3, 4, 1), [5]); +eq("File \"bs_array_test.res\", line 184, characters 5-12", Belt_Array.slice(a$1, 4, 1), [5]); -eq("File \"bs_array_test.res\", line 222, characters 5-12", Belt_Array.slice(a$3, -1, 1), [5]); +eq("File \"bs_array_test.res\", line 185, characters 5-12", Belt_Array.slice(a$1, -1, 1), [5]); -eq("File \"bs_array_test.res\", line 223, characters 5-12", Belt_Array.slice(a$3, -1, 2), [5]); +eq("File \"bs_array_test.res\", line 186, characters 5-12", Belt_Array.slice(a$1, -1, 2), [5]); -eq("File \"bs_array_test.res\", line 224, characters 5-12", Belt_Array.slice(a$3, -2, 1), [4]); +eq("File \"bs_array_test.res\", line 187, characters 5-12", Belt_Array.slice(a$1, -2, 1), [4]); -eq("File \"bs_array_test.res\", line 225, characters 5-12", Belt_Array.slice(a$3, -2, 2), [ +eq("File \"bs_array_test.res\", line 188, characters 5-12", Belt_Array.slice(a$1, -2, 2), [ 4, 5 ]); -eq("File \"bs_array_test.res\", line 226, characters 5-12", Belt_Array.slice(a$3, -2, 3), [ +eq("File \"bs_array_test.res\", line 189, characters 5-12", Belt_Array.slice(a$1, -2, 3), [ 4, 5 ]); -eq("File \"bs_array_test.res\", line 227, characters 5-12", Belt_Array.slice(a$3, -10, 3), [ +eq("File \"bs_array_test.res\", line 190, characters 5-12", Belt_Array.slice(a$1, -10, 3), [ 1, 2, 3 ]); -eq("File \"bs_array_test.res\", line 228, characters 5-12", Belt_Array.slice(a$3, -10, 4), [ +eq("File \"bs_array_test.res\", line 191, characters 5-12", Belt_Array.slice(a$1, -10, 4), [ 1, 2, 3, 4 ]); -eq("File \"bs_array_test.res\", line 229, characters 5-12", Belt_Array.slice(a$3, -10, 5), [ +eq("File \"bs_array_test.res\", line 192, characters 5-12", Belt_Array.slice(a$1, -10, 5), [ 1, 2, 3, @@ -701,7 +588,7 @@ eq("File \"bs_array_test.res\", line 229, characters 5-12", Belt_Array.slice(a$3 5 ]); -eq("File \"bs_array_test.res\", line 230, characters 5-12", Belt_Array.slice(a$3, -10, 6), [ +eq("File \"bs_array_test.res\", line 193, characters 5-12", Belt_Array.slice(a$1, -10, 6), [ 1, 2, 3, @@ -709,11 +596,11 @@ eq("File \"bs_array_test.res\", line 230, characters 5-12", Belt_Array.slice(a$3 5 ]); -eq("File \"bs_array_test.res\", line 231, characters 5-12", Belt_Array.slice(a$3, 0, 0), []); +eq("File \"bs_array_test.res\", line 194, characters 5-12", Belt_Array.slice(a$1, 0, 0), []); -eq("File \"bs_array_test.res\", line 232, characters 5-12", Belt_Array.slice(a$3, 0, -1), []); +eq("File \"bs_array_test.res\", line 195, characters 5-12", Belt_Array.slice(a$1, 0, -1), []); -let a$4 = [ +let a$2 = [ 1, 2, 3, @@ -721,7 +608,7 @@ let a$4 = [ 5 ]; -eq("File \"bs_array_test.res\", line 237, characters 5-12", Belt_Array.sliceToEnd(a$4, 0), [ +eq("File \"bs_array_test.res\", line 200, characters 5-12", Belt_Array.sliceToEnd(a$2, 0), [ 1, 2, 3, @@ -729,18 +616,18 @@ eq("File \"bs_array_test.res\", line 237, characters 5-12", Belt_Array.sliceToEn 5 ]); -eq("File \"bs_array_test.res\", line 238, characters 5-12", Belt_Array.sliceToEnd(a$4, 5), []); +eq("File \"bs_array_test.res\", line 201, characters 5-12", Belt_Array.sliceToEnd(a$2, 5), []); -eq("File \"bs_array_test.res\", line 239, characters 5-12", Belt_Array.sliceToEnd(a$4, 4), [5]); +eq("File \"bs_array_test.res\", line 202, characters 5-12", Belt_Array.sliceToEnd(a$2, 4), [5]); -eq("File \"bs_array_test.res\", line 240, characters 5-12", Belt_Array.sliceToEnd(a$4, -1), [5]); +eq("File \"bs_array_test.res\", line 203, characters 5-12", Belt_Array.sliceToEnd(a$2, -1), [5]); -eq("File \"bs_array_test.res\", line 241, characters 5-12", Belt_Array.sliceToEnd(a$4, -2), [ +eq("File \"bs_array_test.res\", line 204, characters 5-12", Belt_Array.sliceToEnd(a$2, -2), [ 4, 5 ]); -eq("File \"bs_array_test.res\", line 242, characters 5-12", Belt_Array.sliceToEnd(a$4, -10), [ +eq("File \"bs_array_test.res\", line 205, characters 5-12", Belt_Array.sliceToEnd(a$2, -10), [ 1, 2, 3, @@ -748,15 +635,15 @@ eq("File \"bs_array_test.res\", line 242, characters 5-12", Belt_Array.sliceToEn 5 ]); -eq("File \"bs_array_test.res\", line 243, characters 5-12", Belt_Array.sliceToEnd(a$4, 6), []); +eq("File \"bs_array_test.res\", line 206, characters 5-12", Belt_Array.sliceToEnd(a$2, 6), []); -let a$5 = Belt_Array.makeBy(10, (function (x) { +let a$3 = Belt_Array.makeBy(10, (function (x) { return x; })); -Belt_Array.fill(a$5, 0, 3, 0); +Belt_Array.fill(a$3, 0, 3, 0); -eq("File \"bs_array_test.res\", line 248, characters 5-12", a$5.slice(0), [ +eq("File \"bs_array_test.res\", line 211, characters 5-12", a$3.slice(0), [ 0, 0, 0, @@ -769,9 +656,9 @@ eq("File \"bs_array_test.res\", line 248, characters 5-12", a$5.slice(0), [ 9 ]); -Belt_Array.fill(a$5, 2, 8, 1); +Belt_Array.fill(a$3, 2, 8, 1); -eq("File \"bs_array_test.res\", line 250, characters 5-12", a$5.slice(0), [ +eq("File \"bs_array_test.res\", line 213, characters 5-12", a$3.slice(0), [ 0, 0, 1, @@ -784,9 +671,9 @@ eq("File \"bs_array_test.res\", line 250, characters 5-12", a$5.slice(0), [ 1 ]); -Belt_Array.fill(a$5, 8, 1, 9); +Belt_Array.fill(a$3, 8, 1, 9); -eq("File \"bs_array_test.res\", line 252, characters 5-12", a$5.slice(0), [ +eq("File \"bs_array_test.res\", line 215, characters 5-12", a$3.slice(0), [ 0, 0, 1, @@ -799,9 +686,9 @@ eq("File \"bs_array_test.res\", line 252, characters 5-12", a$5.slice(0), [ 1 ]); -Belt_Array.fill(a$5, 8, 2, 9); +Belt_Array.fill(a$3, 8, 2, 9); -eq("File \"bs_array_test.res\", line 254, characters 5-12", a$5.slice(0), [ +eq("File \"bs_array_test.res\", line 217, characters 5-12", a$3.slice(0), [ 0, 0, 1, @@ -814,9 +701,9 @@ eq("File \"bs_array_test.res\", line 254, characters 5-12", a$5.slice(0), [ 9 ]); -Belt_Array.fill(a$5, 8, 3, 12); +Belt_Array.fill(a$3, 8, 3, 12); -eq("File \"bs_array_test.res\", line 256, characters 5-12", a$5.slice(0), [ +eq("File \"bs_array_test.res\", line 219, characters 5-12", a$3.slice(0), [ 0, 0, 1, @@ -829,9 +716,9 @@ eq("File \"bs_array_test.res\", line 256, characters 5-12", a$5.slice(0), [ 12 ]); -Belt_Array.fill(a$5, -2, 3, 11); +Belt_Array.fill(a$3, -2, 3, 11); -eq("File \"bs_array_test.res\", line 258, characters 5-12", a$5.slice(0), [ +eq("File \"bs_array_test.res\", line 221, characters 5-12", a$3.slice(0), [ 0, 0, 1, @@ -844,9 +731,9 @@ eq("File \"bs_array_test.res\", line 258, characters 5-12", a$5.slice(0), [ 11 ]); -Belt_Array.fill(a$5, -3, 3, 10); +Belt_Array.fill(a$3, -3, 3, 10); -eq("File \"bs_array_test.res\", line 260, characters 5-12", a$5.slice(0), [ +eq("File \"bs_array_test.res\", line 223, characters 5-12", a$3.slice(0), [ 0, 0, 1, @@ -859,9 +746,9 @@ eq("File \"bs_array_test.res\", line 260, characters 5-12", a$5.slice(0), [ 10 ]); -Belt_Array.fill(a$5, -3, 1, 7); +Belt_Array.fill(a$3, -3, 1, 7); -eq("File \"bs_array_test.res\", line 262, characters 5-12", a$5.slice(0), [ +eq("File \"bs_array_test.res\", line 225, characters 5-12", a$3.slice(0), [ 0, 0, 1, @@ -874,9 +761,9 @@ eq("File \"bs_array_test.res\", line 262, characters 5-12", a$5.slice(0), [ 10 ]); -Belt_Array.fill(a$5, -13, 1, 7); +Belt_Array.fill(a$3, -13, 1, 7); -eq("File \"bs_array_test.res\", line 264, characters 5-12", a$5.slice(0), [ +eq("File \"bs_array_test.res\", line 227, characters 5-12", a$3.slice(0), [ 7, 0, 1, @@ -889,13 +776,13 @@ eq("File \"bs_array_test.res\", line 264, characters 5-12", a$5.slice(0), [ 10 ]); -Belt_Array.fill(a$5, -13, 12, 7); +Belt_Array.fill(a$3, -13, 12, 7); -eq("File \"bs_array_test.res\", line 266, characters 5-12", a$5.slice(0), Belt_Array.make(10, 7)); +eq("File \"bs_array_test.res\", line 229, characters 5-12", a$3.slice(0), Belt_Array.make(10, 7)); -Belt_Array.fill(a$5, 0, -1, 2); +Belt_Array.fill(a$3, 0, -1, 2); -eq("File \"bs_array_test.res\", line 268, characters 5-12", a$5.slice(0), Belt_Array.make(10, 7)); +eq("File \"bs_array_test.res\", line 231, characters 5-12", a$3.slice(0), Belt_Array.make(10, 7)); let b$1 = [ 1, @@ -905,7 +792,7 @@ let b$1 = [ Belt_Array.fill(b$1, 0, 0, 0); -eq("File \"bs_array_test.res\", line 271, characters 5-12", b$1, [ +eq("File \"bs_array_test.res\", line 234, characters 5-12", b$1, [ 1, 2, 3 @@ -913,7 +800,7 @@ eq("File \"bs_array_test.res\", line 271, characters 5-12", b$1, [ Belt_Array.fill(b$1, 4, 1, 0); -eq("File \"bs_array_test.res\", line 273, characters 5-12", b$1, [ +eq("File \"bs_array_test.res\", line 236, characters 5-12", b$1, [ 1, 2, 3 @@ -927,7 +814,7 @@ let b0 = Belt_Array.make(10, 3); Belt_Array.blit(a0, 1, b0, 2, 5); -eq("File \"bs_array_test.res\", line 280, characters 5-12", b0.slice(0), [ +eq("File \"bs_array_test.res\", line 243, characters 5-12", b0.slice(0), [ 3, 3, 1, @@ -942,7 +829,7 @@ eq("File \"bs_array_test.res\", line 280, characters 5-12", b0.slice(0), [ Belt_Array.blit(a0, -1, b0, 2, 5); -eq("File \"bs_array_test.res\", line 282, characters 5-12", b0.slice(0), [ +eq("File \"bs_array_test.res\", line 245, characters 5-12", b0.slice(0), [ 3, 3, 9, @@ -957,7 +844,7 @@ eq("File \"bs_array_test.res\", line 282, characters 5-12", b0.slice(0), [ Belt_Array.blit(a0, -1, b0, -2, 5); -eq("File \"bs_array_test.res\", line 284, characters 5-12", b0.slice(0), [ +eq("File \"bs_array_test.res\", line 247, characters 5-12", b0.slice(0), [ 3, 3, 9, @@ -972,7 +859,7 @@ eq("File \"bs_array_test.res\", line 284, characters 5-12", b0.slice(0), [ Belt_Array.blit(a0, -2, b0, -2, 2); -eq("File \"bs_array_test.res\", line 286, characters 5-12", b0.slice(0), [ +eq("File \"bs_array_test.res\", line 249, characters 5-12", b0.slice(0), [ 3, 3, 9, @@ -987,11 +874,11 @@ eq("File \"bs_array_test.res\", line 286, characters 5-12", b0.slice(0), [ Belt_Array.blit(a0, -11, b0, -11, 100); -eq("File \"bs_array_test.res\", line 288, characters 5-12", b0.slice(0), a0); +eq("File \"bs_array_test.res\", line 251, characters 5-12", b0.slice(0), a0); Belt_Array.blit(a0, -11, b0, -11, 2); -eq("File \"bs_array_test.res\", line 290, characters 5-12", b0.slice(0), a0); +eq("File \"bs_array_test.res\", line 253, characters 5-12", b0.slice(0), a0); let aa = Belt_Array.makeBy(10, (function (x) { return x; @@ -999,7 +886,7 @@ let aa = Belt_Array.makeBy(10, (function (x) { Belt_Array.blit(aa, -1, aa, 1, 2); -eq("File \"bs_array_test.res\", line 293, characters 5-12", aa.slice(0), [ +eq("File \"bs_array_test.res\", line 256, characters 5-12", aa.slice(0), [ 0, 9, 2, @@ -1014,7 +901,7 @@ eq("File \"bs_array_test.res\", line 293, characters 5-12", aa.slice(0), [ Belt_Array.blit(aa, -2, aa, 1, 2); -eq("File \"bs_array_test.res\", line 295, characters 5-12", aa.slice(0), [ +eq("File \"bs_array_test.res\", line 258, characters 5-12", aa.slice(0), [ 0, 8, 9, @@ -1029,7 +916,7 @@ eq("File \"bs_array_test.res\", line 295, characters 5-12", aa.slice(0), [ Belt_Array.blit(aa, -5, aa, 4, 3); -eq("File \"bs_array_test.res\", line 297, characters 5-12", aa.slice(0), [ +eq("File \"bs_array_test.res\", line 260, characters 5-12", aa.slice(0), [ 0, 8, 9, @@ -1044,7 +931,7 @@ eq("File \"bs_array_test.res\", line 297, characters 5-12", aa.slice(0), [ Belt_Array.blit(aa, 4, aa, 5, 3); -eq("File \"bs_array_test.res\", line 299, characters 5-12", aa.slice(0), [ +eq("File \"bs_array_test.res\", line 262, characters 5-12", aa.slice(0), [ 0, 8, 9, @@ -1057,9 +944,9 @@ eq("File \"bs_array_test.res\", line 299, characters 5-12", aa.slice(0), [ 9 ]); -eq("File \"bs_array_test.res\", line 300, characters 5-12", Belt_Array.make(0, 3), []); +eq("File \"bs_array_test.res\", line 263, characters 5-12", Belt_Array.make(0, 3), []); -eq("File \"bs_array_test.res\", line 301, characters 5-12", Belt_Array.make(-1, 3), []); +eq("File \"bs_array_test.res\", line 264, characters 5-12", Belt_Array.make(-1, 3), []); let c = [ 0, @@ -1069,13 +956,13 @@ let c = [ Belt_Array.blit(c, 4, c, 1, 1); -eq("File \"bs_array_test.res\", line 304, characters 5-12", c, [ +eq("File \"bs_array_test.res\", line 267, characters 5-12", c, [ 0, 1, 2 ]); -eq("File \"bs_array_test.res\", line 308, characters 5-12", Belt_Array.zip([ +eq("File \"bs_array_test.res\", line 271, characters 5-12", Belt_Array.zip([ 1, 2, 3 @@ -1099,7 +986,7 @@ eq("File \"bs_array_test.res\", line 308, characters 5-12", Belt_Array.zip([ ] ]); -eq("File \"bs_array_test.res\", line 309, characters 5-12", Belt_Array.zip([ +eq("File \"bs_array_test.res\", line 272, characters 5-12", Belt_Array.zip([ 2, 3, 4, @@ -1123,7 +1010,7 @@ eq("File \"bs_array_test.res\", line 309, characters 5-12", Belt_Array.zip([ ] ]); -eq("File \"bs_array_test.res\", line 310, characters 5-12", Belt_Array.zipBy([ +eq("File \"bs_array_test.res\", line 273, characters 5-12", Belt_Array.zipBy([ 2, 3, 4, @@ -1140,7 +1027,7 @@ eq("File \"bs_array_test.res\", line 310, characters 5-12", Belt_Array.zipBy([ 1 ]); -eq("File \"bs_array_test.res\", line 311, characters 5-12", Belt_Array.zipBy([ +eq("File \"bs_array_test.res\", line 274, characters 5-12", Belt_Array.zipBy([ 1, 2, 3 @@ -1159,7 +1046,7 @@ eq("File \"bs_array_test.res\", line 311, characters 5-12", Belt_Array.zipBy([ return -x | 0; }))); -eq("File \"bs_array_test.res\", line 312, characters 5-12", Belt_Array.unzip([ +eq("File \"bs_array_test.res\", line 275, characters 5-12", Belt_Array.unzip([ [ 1, 2 @@ -1195,7 +1082,7 @@ function sumUsingForEach(xs) { return v.contents; } -eq("File \"bs_array_test.res\", line 324, characters 5-12", sumUsingForEach([ +eq("File \"bs_array_test.res\", line 287, characters 5-12", sumUsingForEach([ 0, 1, 2, @@ -1203,7 +1090,7 @@ eq("File \"bs_array_test.res\", line 324, characters 5-12", sumUsingForEach([ 4 ]), 10); -b("File \"bs_array_test.res\", line 325, characters 4-11", !Belt_Array.every([ +b("File \"bs_array_test.res\", line 288, characters 4-11", !Belt_Array.every([ 0, 1, 2, @@ -1213,7 +1100,7 @@ b("File \"bs_array_test.res\", line 325, characters 4-11", !Belt_Array.every([ return x > 2; }))); -b("File \"bs_array_test.res\", line 326, characters 4-11", Belt_Array.some([ +b("File \"bs_array_test.res\", line 289, characters 4-11", Belt_Array.some([ 1, 3, 7, @@ -1222,7 +1109,7 @@ b("File \"bs_array_test.res\", line 326, characters 4-11", Belt_Array.some([ return x % 2 === 0; }))); -b("File \"bs_array_test.res\", line 327, characters 4-11", !Belt_Array.some([ +b("File \"bs_array_test.res\", line 290, characters 4-11", !Belt_Array.some([ 1, 3, 7 @@ -1230,7 +1117,7 @@ b("File \"bs_array_test.res\", line 327, characters 4-11", !Belt_Array.some([ return x % 2 === 0; }))); -b("File \"bs_array_test.res\", line 328, characters 4-11", !Belt_Array.eq([ +b("File \"bs_array_test.res\", line 291, characters 4-11", !Belt_Array.eq([ 0, 1 ], [1], (function (prim0, prim1) { @@ -1241,7 +1128,7 @@ let c$1 = { contents: 0 }; -b("File \"bs_array_test.res\", line 330, characters 4-11", (Belt_Array.forEachWithIndex([ +b("File \"bs_array_test.res\", line 293, characters 4-11", (Belt_Array.forEachWithIndex([ 1, 1, 1 @@ -1249,27 +1136,27 @@ b("File \"bs_array_test.res\", line 330, characters 4-11", (Belt_Array.forEachWi c$1.contents = (c$1.contents + i | 0) + v | 0; })), c$1.contents === 6)); -function id$1(loc, x) { +function id(loc, x) { let u = x.slice(0); - eq("File \"bs_array_test.res\", line 341, characters 4-11", Belt_Array.reverse(x), (Belt_Array.reverseInPlace(u), u)); + eq("File \"bs_array_test.res\", line 304, characters 4-11", Belt_Array.reverse(x), (Belt_Array.reverseInPlace(u), u)); } -id$1("File \"bs_array_test.res\", line 351, characters 5-12", []); +id("File \"bs_array_test.res\", line 314, characters 5-12", []); -id$1("File \"bs_array_test.res\", line 352, characters 5-12", [1]); +id("File \"bs_array_test.res\", line 315, characters 5-12", [1]); -id$1("File \"bs_array_test.res\", line 353, characters 5-12", [ +id("File \"bs_array_test.res\", line 316, characters 5-12", [ 1, 2 ]); -id$1("File \"bs_array_test.res\", line 354, characters 5-12", [ +id("File \"bs_array_test.res\", line 317, characters 5-12", [ 1, 2, 3 ]); -id$1("File \"bs_array_test.res\", line 355, characters 5-12", [ +id("File \"bs_array_test.res\", line 318, characters 5-12", [ 1, 2, 3, @@ -1284,14 +1171,14 @@ function some2(xs, ys, x) { return Belt_Array.some2(Belt_List.toArray(xs), Belt_List.toArray(ys), x); } -eq("File \"bs_array_test.res\", line 363, characters 5-12", every2(/* [] */0, { +eq("File \"bs_array_test.res\", line 326, characters 5-12", every2(/* [] */0, { hd: 1, tl: /* [] */0 }, (function (x, y) { return x > y; })), true); -eq("File \"bs_array_test.res\", line 364, characters 5-12", every2({ +eq("File \"bs_array_test.res\", line 327, characters 5-12", every2({ hd: 2, tl: { hd: 3, @@ -1304,7 +1191,7 @@ eq("File \"bs_array_test.res\", line 364, characters 5-12", every2({ return x > y; })), true); -eq("File \"bs_array_test.res\", line 365, characters 5-12", every2({ +eq("File \"bs_array_test.res\", line 328, characters 5-12", every2({ hd: 2, tl: /* [] */0 }, { @@ -1314,7 +1201,7 @@ eq("File \"bs_array_test.res\", line 365, characters 5-12", every2({ return x > y; })), true); -eq("File \"bs_array_test.res\", line 366, characters 5-12", every2({ +eq("File \"bs_array_test.res\", line 329, characters 5-12", every2({ hd: 2, tl: { hd: 3, @@ -1330,7 +1217,7 @@ eq("File \"bs_array_test.res\", line 366, characters 5-12", every2({ return x > y; })), false); -eq("File \"bs_array_test.res\", line 367, characters 5-12", every2({ +eq("File \"bs_array_test.res\", line 330, characters 5-12", every2({ hd: 2, tl: { hd: 3, @@ -1346,14 +1233,14 @@ eq("File \"bs_array_test.res\", line 367, characters 5-12", every2({ return x > y; })), true); -eq("File \"bs_array_test.res\", line 368, characters 5-12", some2(/* [] */0, { +eq("File \"bs_array_test.res\", line 331, characters 5-12", some2(/* [] */0, { hd: 1, tl: /* [] */0 }, (function (x, y) { return x > y; })), false); -eq("File \"bs_array_test.res\", line 369, characters 5-12", some2({ +eq("File \"bs_array_test.res\", line 332, characters 5-12", some2({ hd: 2, tl: { hd: 3, @@ -1366,7 +1253,7 @@ eq("File \"bs_array_test.res\", line 369, characters 5-12", some2({ return x > y; })), true); -eq("File \"bs_array_test.res\", line 370, characters 5-12", some2({ +eq("File \"bs_array_test.res\", line 333, characters 5-12", some2({ hd: 2, tl: { hd: 3, @@ -1382,7 +1269,7 @@ eq("File \"bs_array_test.res\", line 370, characters 5-12", some2({ return x > y; })), true); -eq("File \"bs_array_test.res\", line 371, characters 5-12", some2({ +eq("File \"bs_array_test.res\", line 334, characters 5-12", some2({ hd: 0, tl: { hd: 3, @@ -1398,7 +1285,7 @@ eq("File \"bs_array_test.res\", line 371, characters 5-12", some2({ return x > y; })), false); -eq("File \"bs_array_test.res\", line 372, characters 5-12", some2({ +eq("File \"bs_array_test.res\", line 335, characters 5-12", some2({ hd: 0, tl: { hd: 3, @@ -1414,7 +1301,7 @@ eq("File \"bs_array_test.res\", line 372, characters 5-12", some2({ return x > y; })), true); -eq("File \"bs_array_test.res\", line 376, characters 5-12", Belt_Array.concat([], [ +eq("File \"bs_array_test.res\", line 339, characters 5-12", Belt_Array.concat([], [ 1, 2, 3 @@ -1424,9 +1311,9 @@ eq("File \"bs_array_test.res\", line 376, characters 5-12", Belt_Array.concat([] 3 ]); -eq("File \"bs_array_test.res\", line 377, characters 5-12", Belt_Array.concat([], []), []); +eq("File \"bs_array_test.res\", line 340, characters 5-12", Belt_Array.concat([], []), []); -eq("File \"bs_array_test.res\", line 378, characters 5-12", Belt_Array.concat([ +eq("File \"bs_array_test.res\", line 341, characters 5-12", Belt_Array.concat([ 3, 2 ], [ @@ -1441,7 +1328,7 @@ eq("File \"bs_array_test.res\", line 378, characters 5-12", Belt_Array.concat([ 3 ]); -eq("File \"bs_array_test.res\", line 379, characters 5-12", Belt_Array.concatMany([ +eq("File \"bs_array_test.res\", line 342, characters 5-12", Belt_Array.concatMany([ [ 3, 2 @@ -1459,7 +1346,7 @@ eq("File \"bs_array_test.res\", line 379, characters 5-12", Belt_Array.concatMan 3 ]); -eq("File \"bs_array_test.res\", line 380, characters 5-12", Belt_Array.concatMany([ +eq("File \"bs_array_test.res\", line 343, characters 5-12", Belt_Array.concatMany([ [ 3, 2 @@ -1480,7 +1367,7 @@ eq("File \"bs_array_test.res\", line 380, characters 5-12", Belt_Array.concatMan 0 ]); -eq("File \"bs_array_test.res\", line 381, characters 5-12", Belt_Array.concatMany([ +eq("File \"bs_array_test.res\", line 344, characters 5-12", Belt_Array.concatMany([ [], [ 3, @@ -1502,12 +1389,12 @@ eq("File \"bs_array_test.res\", line 381, characters 5-12", Belt_Array.concatMan 0 ]); -eq("File \"bs_array_test.res\", line 382, characters 5-12", Belt_Array.concatMany([ +eq("File \"bs_array_test.res\", line 345, characters 5-12", Belt_Array.concatMany([ [], [] ]), []); -b("File \"bs_array_test.res\", line 386, characters 4-11", Belt_Array.cmp([ +b("File \"bs_array_test.res\", line 349, characters 4-11", Belt_Array.cmp([ 1, 2, 3 @@ -1518,7 +1405,7 @@ b("File \"bs_array_test.res\", line 386, characters 4-11", Belt_Array.cmp([ 3 ], Caml.int_compare) < 0); -b("File \"bs_array_test.res\", line 387, characters 4-11", Belt_Array.cmp([ +b("File \"bs_array_test.res\", line 350, characters 4-11", Belt_Array.cmp([ 0, 1, 2, @@ -1529,7 +1416,7 @@ b("File \"bs_array_test.res\", line 387, characters 4-11", Belt_Array.cmp([ 3 ], Caml.int_compare) > 0); -b("File \"bs_array_test.res\", line 388, characters 4-11", Belt_Array.cmp([ +b("File \"bs_array_test.res\", line 351, characters 4-11", Belt_Array.cmp([ 1, 2, 3 @@ -1539,7 +1426,7 @@ b("File \"bs_array_test.res\", line 388, characters 4-11", Belt_Array.cmp([ 2 ], Caml.int_compare) > 0); -b("File \"bs_array_test.res\", line 389, characters 4-11", Belt_Array.cmp([ +b("File \"bs_array_test.res\", line 352, characters 4-11", Belt_Array.cmp([ 1, 2, 3 @@ -1549,7 +1436,7 @@ b("File \"bs_array_test.res\", line 389, characters 4-11", Belt_Array.cmp([ 3 ], Caml.int_compare) === 0); -b("File \"bs_array_test.res\", line 390, characters 4-11", Belt_Array.cmp([ +b("File \"bs_array_test.res\", line 353, characters 4-11", Belt_Array.cmp([ 1, 2, 4 @@ -1559,7 +1446,7 @@ b("File \"bs_array_test.res\", line 390, characters 4-11", Belt_Array.cmp([ 3 ], Caml.int_compare) > 0); -eq("File \"bs_array_test.res\", line 394, characters 5-12", Belt_Array.getBy([ +eq("File \"bs_array_test.res\", line 357, characters 5-12", Belt_Array.getBy([ 1, 2, 3 @@ -1567,7 +1454,7 @@ eq("File \"bs_array_test.res\", line 394, characters 5-12", Belt_Array.getBy([ return x > 1; })), 2); -eq("File \"bs_array_test.res\", line 395, characters 5-12", Belt_Array.getBy([ +eq("File \"bs_array_test.res\", line 358, characters 5-12", Belt_Array.getBy([ 1, 2, 3 @@ -1575,7 +1462,7 @@ eq("File \"bs_array_test.res\", line 395, characters 5-12", Belt_Array.getBy([ return x > 3; })), undefined); -eq("File \"bs_array_test.res\", line 399, characters 5-12", Belt_Array.getIndexBy([ +eq("File \"bs_array_test.res\", line 362, characters 5-12", Belt_Array.getIndexBy([ 1, 2, 3 @@ -1583,7 +1470,7 @@ eq("File \"bs_array_test.res\", line 399, characters 5-12", Belt_Array.getIndexB return x > 1; })), 1); -eq("File \"bs_array_test.res\", line 400, characters 5-12", Belt_Array.getIndexBy([ +eq("File \"bs_array_test.res\", line 363, characters 5-12", Belt_Array.getIndexBy([ 1, 2, 3 @@ -1599,13 +1486,13 @@ arr.push(2); arr.push(1); -eq("File \"bs_array_test.res\", line 408, characters 5-12", arr, [ +eq("File \"bs_array_test.res\", line 371, characters 5-12", arr, [ 3, 2, 1 ]); -Mt.from_pair_suites("File \"bs_array_test.res\", line 411, characters 20-27", suites.contents); +Mt.from_pair_suites("File \"bs_array_test.res\", line 374, characters 20-27", suites.contents); let A; @@ -1624,5 +1511,5 @@ exports.add = add; exports.addone = addone; exports.makeMatrixExn = makeMatrixExn; exports.sumUsingForEach = sumUsingForEach; -exports.id = id$1; +exports.id = id; /* Not a pure module */ diff --git a/jscomp/test/bs_array_test.res b/jscomp/test/bs_array_test.res index 66259e5e99..019a108136 100644 --- a/jscomp/test/bs_array_test.res +++ b/jscomp/test/bs_array_test.res @@ -78,43 +78,6 @@ let () = { ) } -let id = x => eq(__LOC__, \"@@"(Js.Vector.toList, Js.List.toVector(x)), x) - -let () = { - eq(__LOC__, Js.List.toVector(list{1, 2, 3}), [1, 2, 3]) - eq(__LOC__, Js.Vector.map((. x) => x + 1, [1, 2, 3]), [2, 3, 4]) - eq(__LOC__, Js.Vector.make(5, 3), [3, 3, 3, 3, 3]) - eq( - __LOC__, - { - let a = Js.Vector.init(5, (. i) => i + 1) - Js.Vector.filterInPlace((. j) => mod(j, 2) == 0, a) - a - }, - [2, 4], - ) - - eq( - __LOC__, - { - let a = Js.Vector.init(5, (. i) => i + 1) - Js.Vector.filterInPlace((. j) => mod(j, 2) != 0, a) - a - }, - [1, 3, 5], - ) - - eq(__LOC__, Js.List.toVector(list{1, 2, 3}), [1, 2, 3]) - eq(__LOC__, Js.List.toVector(list{1}), [1]) - id(list{}) - id(list{1}) - id(list{1, 2, 3, 4, 5}) - id({ - open Js.Vector - \"@@"(toList, init(100, (. i) => i)) - }) -} - let add = (x, y) => x + y let () = { let v = A.makeBy(3000, i => i) diff --git a/jscomp/test/build.ninja b/jscomp/test/build.ninja index d3d8237e0f..fb802b91e2 100644 --- a/jscomp/test/build.ninja +++ b/jscomp/test/build.ninja @@ -397,7 +397,6 @@ o test/js_float_test.cmi test/js_float_test.cmj : cc test/js_float_test.res | te o test/js_global_test.cmi test/js_global_test.cmj : cc test/js_global_test.res | test/mt.cmj $bsc $stdlib runtime o test/js_int_test.cmi test/js_int_test.cmj : cc test/js_int_test.res | test/mt.cmj $bsc $stdlib runtime o test/js_json_test.cmi test/js_json_test.cmj : cc test/js_json_test.res | test/mt.cmj $bsc $stdlib runtime -o test/js_list_test.cmi test/js_list_test.cmj : cc test/js_list_test.res | test/mt.cmj $bsc $stdlib runtime o test/js_math_test.cmi test/js_math_test.cmj : cc test/js_math_test.res | test/mt.cmj $bsc $stdlib runtime o test/js_null_test.cmi test/js_null_test.cmj : cc test/js_null_test.res | test/mt.cmj $bsc $stdlib runtime o test/js_null_undefined_test.cmi test/js_null_undefined_test.cmj : cc test/js_null_undefined_test.res | test/mt.cmj $bsc $stdlib runtime @@ -715,4 +714,4 @@ o test/update_record_test.cmi test/update_record_test.cmj : cc test/update_recor o test/variant.cmi test/variant.cmj : cc test/variant.res | $bsc $stdlib runtime o test/variantsMatching.cmi test/variantsMatching.cmj : cc test/variantsMatching.res | $bsc $stdlib runtime o test/webpack_config.cmi test/webpack_config.cmj : cc test/webpack_config.res | $bsc $stdlib runtime -o test : phony test/406_primitive_test.cmi test/406_primitive_test.cmj test/AsInUncurriedExternals.cmi test/AsInUncurriedExternals.cmj test/Coercion.cmi test/Coercion.cmj test/DerivingAccessorsCurried.cmi test/DerivingAccessorsCurried.cmj test/DerivingAccessorsUncurried.cmi test/DerivingAccessorsUncurried.cmj test/DictInference.cmi test/DictInference.cmj test/DisambiguateOptionalFields.cmi test/DisambiguateOptionalFields.cmj test/DotDotDot.cmi test/DotDotDot.cmj test/EmptyRecord.cmi test/EmptyRecord.cmj test/ExternalArity.cmi test/ExternalArity.cmj test/FFI.cmi test/FFI.cmj test/Import.cmi test/Import.cmj test/ImportAttributes.cmi test/ImportAttributes.cmj test/PartialApplicationNoRuntimeCurry.cmi test/PartialApplicationNoRuntimeCurry.cmj test/RecordCoercion.cmi test/RecordCoercion.cmj test/RecordOrObject.cmi test/RecordOrObject.cmj test/SafePromises.cmi test/SafePromises.cmj test/UncurriedAlways.cmi test/UncurriedAlways.cmj test/UncurriedExternals.cmi test/UncurriedExternals.cmj test/UncurriedPervasives.cmi test/UncurriedPervasives.cmj test/UntaggedVariants.cmi test/UntaggedVariants.cmj test/VariantCoercion.cmi test/VariantCoercion.cmj test/VariantSpreads.cmi test/VariantSpreads.cmj test/a.cmi test/a.cmj test/a_filename_test.cmi test/a_filename_test.cmj test/a_list_test.cmi test/a_list_test.cmj test/a_recursive_type.cmi test/a_recursive_type.cmj test/a_scope_bug.cmi test/a_scope_bug.cmj test/a_string_test.cmi test/a_string_test.cmj test/abstract_type.cmi test/abstract_type.cmj test/adt_optimize_test.cmi test/adt_optimize_test.cmj test/alias_default_value_test.cmi test/alias_default_value_test.cmj test/alias_test.cmi test/alias_test.cmj test/and_or_tailcall_test.cmi test/and_or_tailcall_test.cmj test/argv_test.cmi test/argv_test.cmj test/ari_regress_test.cmi test/ari_regress_test.cmj test/arith_lexer.cmi test/arith_lexer.cmj test/arith_parser.cmi test/arith_parser.cmj test/arith_syntax.cmi test/arith_syntax.cmj test/arity.cmi test/arity.cmj test/arity_deopt.cmi test/arity_deopt.cmj test/arity_infer.cmi test/arity_infer.cmj test/array_data_util.cmi test/array_data_util.cmj test/array_safe_get.cmi test/array_safe_get.cmj test/array_subtle_test.cmi test/array_subtle_test.cmj test/array_test.cmi test/array_test.cmj test/as_inline_record_test.cmi test/as_inline_record_test.cmj test/ast_abstract_test.cmi test/ast_abstract_test.cmj test/ast_mapper_unused_warning_test.cmi test/ast_mapper_unused_warning_test.cmj test/async_await.cmi test/async_await.cmj test/async_ideas.cmi test/async_ideas.cmj test/async_inline.cmi test/async_inline.cmj test/async_inside_loop.cmi test/async_inside_loop.cmj test/attr_test.cmi test/attr_test.cmj test/b.cmi test/b.cmj test/bal_set_mini.cmi test/bal_set_mini.cmj test/bang_primitive.cmi test/bang_primitive.cmj test/basic_module_test.cmi test/basic_module_test.cmj test/bb.cmi test/bb.cmj test/bdd.cmi test/bdd.cmj test/belt_internal_test.cmi test/belt_internal_test.cmj test/belt_result_alias_test.cmi test/belt_result_alias_test.cmj test/bench.cmi test/bench.cmj test/big_enum.cmi test/big_enum.cmj test/big_polyvar_test.cmi test/big_polyvar_test.cmj test/bigint_test.cmi test/bigint_test.cmj test/block_alias_test.cmi test/block_alias_test.cmj test/boolean_test.cmi test/boolean_test.cmj test/bs_MapInt_test.cmi test/bs_MapInt_test.cmj test/bs_abstract_test.cmi test/bs_abstract_test.cmj test/bs_array_test.cmi test/bs_array_test.cmj test/bs_auto_uncurry.cmi test/bs_auto_uncurry.cmj test/bs_auto_uncurry_test.cmi test/bs_auto_uncurry_test.cmj test/bs_float_test.cmi test/bs_float_test.cmj test/bs_hashmap_test.cmi test/bs_hashmap_test.cmj test/bs_hashset_int_test.cmi test/bs_hashset_int_test.cmj test/bs_hashtbl_string_test.cmi test/bs_hashtbl_string_test.cmj test/bs_ignore_effect.cmi test/bs_ignore_effect.cmj test/bs_ignore_test.cmi test/bs_ignore_test.cmj test/bs_int_test.cmi test/bs_int_test.cmj test/bs_list_test.cmi test/bs_list_test.cmj test/bs_map_set_dict_test.cmi test/bs_map_set_dict_test.cmj test/bs_map_test.cmi test/bs_map_test.cmj test/bs_min_max_test.cmi test/bs_min_max_test.cmj test/bs_mutable_set_test.cmi test/bs_mutable_set_test.cmj test/bs_poly_map_test.cmi test/bs_poly_map_test.cmj test/bs_poly_mutable_map_test.cmi test/bs_poly_mutable_map_test.cmj test/bs_poly_mutable_set_test.cmi test/bs_poly_mutable_set_test.cmj test/bs_poly_set_test.cmi test/bs_poly_set_test.cmj test/bs_qualified.cmi test/bs_qualified.cmj test/bs_queue_test.cmi test/bs_queue_test.cmj test/bs_rbset_int_bench.cmi test/bs_rbset_int_bench.cmj test/bs_rest_test.cmi test/bs_rest_test.cmj test/bs_set_bench.cmi test/bs_set_bench.cmj test/bs_set_int_test.cmi test/bs_set_int_test.cmj test/bs_sort_test.cmi test/bs_sort_test.cmj test/bs_splice_partial.cmi test/bs_splice_partial.cmj test/bs_stack_test.cmi test/bs_stack_test.cmj test/bs_string_test.cmi test/bs_string_test.cmj test/bs_unwrap_test.cmi test/bs_unwrap_test.cmj test/buffer_test.cmi test/buffer_test.cmj test/bytes_split_gpr_743_test.cmi test/bytes_split_gpr_743_test.cmj test/caml_compare_bigint_test.cmi test/caml_compare_bigint_test.cmj test/caml_compare_test.cmi test/caml_compare_test.cmj test/caml_format_test.cmi test/caml_format_test.cmj test/chain_code_test.cmi test/chain_code_test.cmj test/chn_test.cmi test/chn_test.cmj test/class_type_ffi_test.cmi test/class_type_ffi_test.cmj test/coercion_module_alias_test.cmi test/coercion_module_alias_test.cmj test/compare_test.cmi test/compare_test.cmj test/complete_parmatch_test.cmi test/complete_parmatch_test.cmj test/complex_if_test.cmi test/complex_if_test.cmj test/complex_test.cmi test/complex_test.cmj test/complex_while_loop.cmi test/complex_while_loop.cmj test/condition_compilation_test.cmi test/condition_compilation_test.cmj test/config1_test.cmi test/config1_test.cmj test/console_log_test.cmi test/console_log_test.cmj test/const_block_test.cmi test/const_block_test.cmj test/const_defs.cmi test/const_defs.cmj test/const_defs_test.cmi test/const_defs_test.cmj test/const_test.cmi test/const_test.cmj test/cont_int_fold_test.cmi test/cont_int_fold_test.cmj test/cps_test.cmi test/cps_test.cmj test/cross_module_inline_test.cmi test/cross_module_inline_test.cmj test/custom_error_test.cmi test/custom_error_test.cmj test/debug_keep_test.cmi test/debug_keep_test.cmj test/debug_mode_value.cmi test/debug_mode_value.cmj test/debug_tmp.cmi test/debug_tmp.cmj test/debugger_test.cmi test/debugger_test.cmj test/default_export_test.cmi test/default_export_test.cmj test/defunctor_make_test.cmi test/defunctor_make_test.cmj test/demo_int_map.cmi test/demo_int_map.cmj test/demo_page.cmi test/demo_page.cmj test/demo_pipe.cmi test/demo_pipe.cmj test/derive_projector_test.cmi test/derive_projector_test.cmj test/digest_test.cmi test/digest_test.cmj test/directives.cmi test/directives.cmj test/div_by_zero_test.cmi test/div_by_zero_test.cmj test/dollar_escape_test.cmi test/dollar_escape_test.cmj test/earger_curry_test.cmi test/earger_curry_test.cmj test/effect.cmi test/effect.cmj test/epsilon_test.cmi test/epsilon_test.cmj test/equal_box_test.cmi test/equal_box_test.cmj test/equal_exception_test.cmi test/equal_exception_test.cmj test/equal_test.cmi test/equal_test.cmj test/es6_export.cmi test/es6_export.cmj test/es6_import.cmi test/es6_import.cmj test/es6_module_test.cmi test/es6_module_test.cmj test/escape_esmodule.cmi test/escape_esmodule.cmj test/esmodule_ref.cmi test/esmodule_ref.cmj test/event_ffi.cmi test/event_ffi.cmj test/exception_alias.cmi test/exception_alias.cmj test/exception_raise_test.cmi test/exception_raise_test.cmj test/exception_rebound_err_test.cmi test/exception_rebound_err_test.cmj test/exception_value_test.cmi test/exception_value_test.cmj test/exotic_labels_test.cmi test/exotic_labels_test.cmj test/exponentiation_precedence_test.cmi test/exponentiation_precedence_test.cmj test/export_keyword.cmi test/export_keyword.cmj test/ext_array_test.cmi test/ext_array_test.cmj test/ext_bytes_test.cmi test/ext_bytes_test.cmj test/ext_filename_test.cmi test/ext_filename_test.cmj test/ext_list_test.cmi test/ext_list_test.cmj test/ext_pervasives_test.cmi test/ext_pervasives_test.cmj test/ext_string_test.cmi test/ext_string_test.cmj test/ext_sys_test.cmi test/ext_sys_test.cmj test/extensible_variant_test.cmi test/extensible_variant_test.cmj test/external_polyfill_test.cmi test/external_polyfill_test.cmj test/external_ppx.cmi test/external_ppx.cmj test/external_ppx2.cmi test/external_ppx2.cmj test/fail_comp.cmi test/fail_comp.cmj test/ffi_arity_test.cmi test/ffi_arity_test.cmj test/ffi_array_test.cmi test/ffi_array_test.cmj test/ffi_js_test.cmi test/ffi_js_test.cmj test/ffi_splice_test.cmi test/ffi_splice_test.cmj test/ffi_test.cmi test/ffi_test.cmj test/fib.cmi test/fib.cmj test/flattern_order_test.cmi test/flattern_order_test.cmj test/flexible_array_test.cmi test/flexible_array_test.cmj test/float_array.cmi test/float_array.cmj test/float_of_bits_test.cmi test/float_of_bits_test.cmj test/float_record.cmi test/float_record.cmj test/float_test.cmi test/float_test.cmj test/floatarray_test.cmi test/floatarray_test.cmj test/for_loop_test.cmi test/for_loop_test.cmj test/for_side_effect_test.cmi test/for_side_effect_test.cmj test/format_regression.cmi test/format_regression.cmj test/format_test.cmi test/format_test.cmj test/fun_pattern_match.cmi test/fun_pattern_match.cmj test/function_directives.cmi test/function_directives.cmj test/function_directives_no_inline.cmi test/function_directives_no_inline.cmj test/functor_app_test.cmi test/functor_app_test.cmj test/functor_def.cmi test/functor_def.cmj test/functor_ffi.cmi test/functor_ffi.cmj test/functor_inst.cmi test/functor_inst.cmj test/functors.cmi test/functors.cmj test/gbk.cmi test/gbk.cmj test/genlex_test.cmi test/genlex_test.cmj test/gentTypeReTest.cmi test/gentTypeReTest.cmj test/global_exception_regression_test.cmi test/global_exception_regression_test.cmj test/global_mangles.cmi test/global_mangles.cmj test/global_module_alias_test.cmi test/global_module_alias_test.cmj test/google_closure_test.cmi test/google_closure_test.cmj test/gpr496_test.cmi test/gpr496_test.cmj test/gpr_1072.cmi test/gpr_1072.cmj test/gpr_1072_reg.cmi test/gpr_1072_reg.cmj test/gpr_1150.cmi test/gpr_1150.cmj test/gpr_1154_test.cmi test/gpr_1154_test.cmj test/gpr_1170.cmi test/gpr_1170.cmj test/gpr_1240_missing_unbox.cmi test/gpr_1240_missing_unbox.cmj test/gpr_1245_test.cmi test/gpr_1245_test.cmj test/gpr_1268.cmi test/gpr_1268.cmj test/gpr_1409_test.cmi test/gpr_1409_test.cmj test/gpr_1423_app_test.cmi test/gpr_1423_app_test.cmj test/gpr_1423_nav.cmi test/gpr_1423_nav.cmj test/gpr_1438.cmi test/gpr_1438.cmj test/gpr_1481.cmi test/gpr_1481.cmj test/gpr_1484.cmi test/gpr_1484.cmj test/gpr_1503_test.cmi test/gpr_1503_test.cmj test/gpr_1539_test.cmi test/gpr_1539_test.cmj test/gpr_1658_test.cmi test/gpr_1658_test.cmj test/gpr_1667_test.cmi test/gpr_1667_test.cmj test/gpr_1692_test.cmi test/gpr_1692_test.cmj test/gpr_1698_test.cmi test/gpr_1698_test.cmj test/gpr_1701_test.cmi test/gpr_1701_test.cmj test/gpr_1716_test.cmi test/gpr_1716_test.cmj test/gpr_1717_test.cmi test/gpr_1717_test.cmj test/gpr_1728_test.cmi test/gpr_1728_test.cmj test/gpr_1749_test.cmi test/gpr_1749_test.cmj test/gpr_1759_test.cmi test/gpr_1759_test.cmj test/gpr_1760_test.cmi test/gpr_1760_test.cmj test/gpr_1762_test.cmi test/gpr_1762_test.cmj test/gpr_1817_test.cmi test/gpr_1817_test.cmj test/gpr_1822_test.cmi test/gpr_1822_test.cmj test/gpr_1891_test.cmi test/gpr_1891_test.cmj test/gpr_1943_test.cmi test/gpr_1943_test.cmj test/gpr_1946_test.cmi test/gpr_1946_test.cmj test/gpr_2316_test.cmi test/gpr_2316_test.cmj test/gpr_2352_test.cmi test/gpr_2352_test.cmj test/gpr_2413_test.cmi test/gpr_2413_test.cmj test/gpr_2474.cmi test/gpr_2474.cmj test/gpr_2487.cmi test/gpr_2487.cmj test/gpr_2503_test.cmi test/gpr_2503_test.cmj test/gpr_2608_test.cmi test/gpr_2608_test.cmj test/gpr_2614_test.cmi test/gpr_2614_test.cmj test/gpr_2633_test.cmi test/gpr_2633_test.cmj test/gpr_2642_test.cmi test/gpr_2642_test.cmj test/gpr_2682_test.cmi test/gpr_2682_test.cmj test/gpr_2700_test.cmi test/gpr_2700_test.cmj test/gpr_2731_test.cmi test/gpr_2731_test.cmj test/gpr_2789_test.cmi test/gpr_2789_test.cmj test/gpr_2931_test.cmi test/gpr_2931_test.cmj test/gpr_3142_test.cmi test/gpr_3142_test.cmj test/gpr_3154_test.cmi test/gpr_3154_test.cmj test/gpr_3209_test.cmi test/gpr_3209_test.cmj test/gpr_3492_test.cmi test/gpr_3492_test.cmj test/gpr_3519_jsx_test.cmi test/gpr_3519_jsx_test.cmj test/gpr_3519_test.cmi test/gpr_3519_test.cmj test/gpr_3536_test.cmi test/gpr_3536_test.cmj test/gpr_3546_test.cmi test/gpr_3546_test.cmj test/gpr_3548_test.cmi test/gpr_3548_test.cmj test/gpr_3549_test.cmi test/gpr_3549_test.cmj test/gpr_3566_drive_test.cmi test/gpr_3566_drive_test.cmj test/gpr_3566_test.cmi test/gpr_3566_test.cmj test/gpr_3595_test.cmi test/gpr_3595_test.cmj test/gpr_3609_test.cmi test/gpr_3609_test.cmj test/gpr_3697_test.cmi test/gpr_3697_test.cmj test/gpr_373_test.cmi test/gpr_373_test.cmj test/gpr_3770_test.cmi test/gpr_3770_test.cmj test/gpr_3852_alias.cmi test/gpr_3852_alias.cmj test/gpr_3852_alias_reify.cmi test/gpr_3852_alias_reify.cmj test/gpr_3852_effect.cmi test/gpr_3852_effect.cmj test/gpr_3865.cmi test/gpr_3865.cmj test/gpr_3865_bar.cmi test/gpr_3865_bar.cmj test/gpr_3865_foo.cmi test/gpr_3865_foo.cmj test/gpr_3875_test.cmi test/gpr_3875_test.cmj test/gpr_3877_test.cmi test/gpr_3877_test.cmj test/gpr_3895_test.cmi test/gpr_3895_test.cmj test/gpr_3897_test.cmi test/gpr_3897_test.cmj test/gpr_3931_test.cmi test/gpr_3931_test.cmj test/gpr_3980_test.cmi test/gpr_3980_test.cmj test/gpr_4025_test.cmi test/gpr_4025_test.cmj test/gpr_405_test.cmi test/gpr_405_test.cmj test/gpr_4069_test.cmi test/gpr_4069_test.cmj test/gpr_4265_test.cmi test/gpr_4265_test.cmj test/gpr_4274_test.cmi test/gpr_4274_test.cmj test/gpr_4280_test.cmi test/gpr_4280_test.cmj test/gpr_4407_test.cmi test/gpr_4407_test.cmj test/gpr_441.cmi test/gpr_441.cmj test/gpr_4442_test.cmi test/gpr_4442_test.cmj test/gpr_4491_test.cmi test/gpr_4491_test.cmj test/gpr_4494_test.cmi test/gpr_4494_test.cmj test/gpr_4519_test.cmi test/gpr_4519_test.cmj test/gpr_459_test.cmi test/gpr_459_test.cmj test/gpr_4632.cmi test/gpr_4632.cmj test/gpr_4639_test.cmi test/gpr_4639_test.cmj test/gpr_4900_test.cmi test/gpr_4900_test.cmj test/gpr_4924_test.cmi test/gpr_4924_test.cmj test/gpr_4931.cmi test/gpr_4931.cmj test/gpr_4931_allow.cmi test/gpr_4931_allow.cmj test/gpr_5071_test.cmi test/gpr_5071_test.cmj test/gpr_5169_test.cmi test/gpr_5169_test.cmj test/gpr_5218_test.cmi test/gpr_5218_test.cmj test/gpr_5280_optimize_test.cmi test/gpr_5280_optimize_test.cmj test/gpr_5557.cmi test/gpr_5557.cmj test/gpr_5753.cmi test/gpr_5753.cmj test/gpr_658.cmi test/gpr_658.cmj test/gpr_858_test.cmi test/gpr_858_test.cmj test/gpr_858_unit2_test.cmi test/gpr_858_unit2_test.cmj test/gpr_904_test.cmi test/gpr_904_test.cmj test/gpr_974_test.cmi test/gpr_974_test.cmj test/gpr_977_test.cmi test/gpr_977_test.cmj test/gpr_return_type_unused_attribute.cmi test/gpr_return_type_unused_attribute.cmj test/gray_code_test.cmi test/gray_code_test.cmj test/guide_for_ext.cmi test/guide_for_ext.cmj test/hash_collision_test.cmi test/hash_collision_test.cmj test/hash_sugar_desugar.cmi test/hash_sugar_desugar.cmj test/hash_test.cmi test/hash_test.cmj test/hashtbl_test.cmi test/hashtbl_test.cmj test/hello.foo.cmi test/hello.foo.cmj test/hello_res.cmi test/hello_res.cmj test/ignore_test.cmi test/ignore_test.cmj test/ignore_uncurry_attribute.cmi test/ignore_uncurry_attribute.cmj test/imm_map_bench.cmi test/imm_map_bench.cmj test/import2.cmi test/import2.cmj test/import_external.cmi test/import_external.cmj test/import_side_effect.cmi test/import_side_effect.cmj test/import_side_effect_free.cmi test/import_side_effect_free.cmj test/include_side_effect.cmi test/include_side_effect.cmj test/include_side_effect_free.cmi test/include_side_effect_free.cmj test/incomplete_toplevel_test.cmi test/incomplete_toplevel_test.cmj test/infer_type_test.cmi test/infer_type_test.cmj test/inline_condition_with_pattern_matching.cmi test/inline_condition_with_pattern_matching.cmj test/inline_const.cmi test/inline_const.cmj test/inline_const_test.cmi test/inline_const_test.cmj test/inline_edge_cases.cmi test/inline_edge_cases.cmj test/inline_map2_test.cmi test/inline_map2_test.cmj test/inline_map_demo.cmi test/inline_map_demo.cmj test/inline_map_test.cmi test/inline_map_test.cmj test/inline_record_test.cmi test/inline_record_test.cmj test/inline_regression_test.cmi test/inline_regression_test.cmj test/inline_string_test.cmi test/inline_string_test.cmj test/inner_call.cmi test/inner_call.cmj test/inner_define.cmi test/inner_define.cmj test/inner_unused.cmi test/inner_unused.cmj test/installation_test.cmi test/installation_test.cmj test/int32_test.cmi test/int32_test.cmj test/int64_mul_div_test.cmi test/int64_mul_div_test.cmj test/int64_string_bench.cmi test/int64_string_bench.cmj test/int64_string_test.cmi test/int64_string_test.cmj test/int64_test.cmi test/int64_test.cmj test/int_hashtbl_test.cmi test/int_hashtbl_test.cmj test/int_map.cmi test/int_map.cmj test/int_overflow_test.cmi test/int_overflow_test.cmj test/int_poly_var.cmi test/int_poly_var.cmj test/int_switch_test.cmi test/int_switch_test.cmj test/internal_unused_test.cmi test/internal_unused_test.cmj test/io_test.cmi test/io_test.cmj test/js_array_test.cmi test/js_array_test.cmj test/js_bool_test.cmi test/js_bool_test.cmj test/js_cast_test.cmi test/js_cast_test.cmj test/js_date_test.cmi test/js_date_test.cmj test/js_dict_test.cmi test/js_dict_test.cmj test/js_exception_catch_test.cmi test/js_exception_catch_test.cmj test/js_float_test.cmi test/js_float_test.cmj test/js_global_test.cmi test/js_global_test.cmj test/js_int_test.cmi test/js_int_test.cmj test/js_json_test.cmi test/js_json_test.cmj test/js_list_test.cmi test/js_list_test.cmj test/js_math_test.cmi test/js_math_test.cmj test/js_null_test.cmi test/js_null_test.cmj test/js_null_undefined_test.cmi test/js_null_undefined_test.cmj test/js_nullable_test.cmi test/js_nullable_test.cmj test/js_obj_test.cmi test/js_obj_test.cmj test/js_option_test.cmi test/js_option_test.cmj test/js_re_test.cmi test/js_re_test.cmj test/js_string_test.cmi test/js_string_test.cmj test/js_undefined_test.cmi test/js_undefined_test.cmj test/js_val.cmi test/js_val.cmj test/jsoo_400_test.cmi test/jsoo_400_test.cmj test/jsoo_485_test.cmi test/jsoo_485_test.cmj test/jsxv4_newtype.cmi test/jsxv4_newtype.cmj test/keep_uncurry_attribute.cmi test/keep_uncurry_attribute.cmj test/key_word_property.cmi test/key_word_property.cmj test/key_word_property2.cmi test/key_word_property2.cmj test/key_word_property_plus_test.cmi test/key_word_property_plus_test.cmj test/label_uncurry.cmi test/label_uncurry.cmj test/large_integer_pat.cmi test/large_integer_pat.cmj test/large_record_duplication_test.cmi test/large_record_duplication_test.cmj test/largest_int_flow.cmi test/largest_int_flow.cmj test/lazy_demo.cmi test/lazy_demo.cmj test/lazy_test.cmi test/lazy_test.cmj test/lib_js_test.cmi test/lib_js_test.cmj test/libarg_test.cmi test/libarg_test.cmj test/libqueue_test.cmi test/libqueue_test.cmj test/limits_test.cmi test/limits_test.cmj test/list_stack.cmi test/list_stack.cmj test/list_test.cmi test/list_test.cmj test/local_exception_test.cmi test/local_exception_test.cmj test/loop_regression_test.cmi test/loop_regression_test.cmj test/loop_suites_test.cmi test/loop_suites_test.cmj test/map_find_test.cmi test/map_find_test.cmj test/map_test.cmi test/map_test.cmj test/mario_game.cmi test/mario_game.cmj test/marshal.cmi test/marshal.cmj test/meth_annotation.cmi test/meth_annotation.cmj test/method_name_test.cmi test/method_name_test.cmj test/method_string_name.cmi test/method_string_name.cmj test/minimal_test.cmi test/minimal_test.cmj test/miss_colon_test.cmi test/miss_colon_test.cmj test/mock_mt.cmi test/mock_mt.cmj test/module_alias_test.cmi test/module_alias_test.cmj test/module_as_class_ffi.cmi test/module_as_class_ffi.cmj test/module_as_function.cmi test/module_as_function.cmj test/module_missing_conversion.cmi test/module_missing_conversion.cmj test/module_parameter_test.cmi test/module_parameter_test.cmj test/module_splice_test.cmi test/module_splice_test.cmj test/more_poly_variant_test.cmi test/more_poly_variant_test.cmj test/more_uncurry.cmi test/more_uncurry.cmj test/mpr_6033_test.cmi test/mpr_6033_test.cmj test/mt.cmi test/mt.cmj test/mt_global.cmi test/mt_global.cmj test/mutable_obj_test.cmi test/mutable_obj_test.cmj test/mutable_uncurry_test.cmi test/mutable_uncurry_test.cmj test/mutual_non_recursive_type.cmi test/mutual_non_recursive_type.cmj test/name_mangle_test.cmi test/name_mangle_test.cmj test/nested_include.cmi test/nested_include.cmj test/nested_module_alias.cmi test/nested_module_alias.cmj test/nested_obj_literal.cmi test/nested_obj_literal.cmj test/nested_obj_test.cmi test/nested_obj_test.cmj test/nested_pattern_match_test.cmi test/nested_pattern_match_test.cmj test/noassert.cmi test/noassert.cmj test/node_path_test.cmi test/node_path_test.cmj test/null_list_test.cmi test/null_list_test.cmj test/number_lexer.cmi test/number_lexer.cmj test/obj_literal_ppx.cmi test/obj_literal_ppx.cmj test/obj_literal_ppx_test.cmi test/obj_literal_ppx_test.cmj test/obj_magic_test.cmi test/obj_magic_test.cmj test/obj_type_test.cmi test/obj_type_test.cmj test/ocaml_re_test.cmi test/ocaml_re_test.cmj test/of_string_test.cmi test/of_string_test.cmj test/offset.cmi test/offset.cmj test/omit_trailing_undefined_in_external_calls.cmi test/omit_trailing_undefined_in_external_calls.cmj test/option_encoding_test.cmi test/option_encoding_test.cmj test/option_record_none_test.cmi test/option_record_none_test.cmj test/option_repr_test.cmi test/option_repr_test.cmj test/optional_ffi_test.cmi test/optional_ffi_test.cmj test/optional_regression_test.cmi test/optional_regression_test.cmj test/pipe_send_readline.cmi test/pipe_send_readline.cmj test/pipe_syntax.cmi test/pipe_syntax.cmj test/poly_empty_array.cmi test/poly_empty_array.cmj test/poly_variant_test.cmi test/poly_variant_test.cmj test/polymorphic_raw_test.cmi test/polymorphic_raw_test.cmj test/polymorphism_test.cmi test/polymorphism_test.cmj test/polyvar_convert.cmi test/polyvar_convert.cmj test/polyvar_test.cmi test/polyvar_test.cmj test/ppx_apply_test.cmi test/ppx_apply_test.cmj test/pq_test.cmi test/pq_test.cmj test/pr6726.cmi test/pr6726.cmj test/prepend_data_ffi.cmi test/prepend_data_ffi.cmj test/primitive_reg_test.cmi test/primitive_reg_test.cmj test/print_alpha_test.cmi test/print_alpha_test.cmj test/queue_402.cmi test/queue_402.cmj test/queue_test.cmi test/queue_test.cmj test/random_test.cmi test/random_test.cmj test/raw_hash_tbl_bench.cmi test/raw_hash_tbl_bench.cmj test/raw_output_test.cmi test/raw_output_test.cmj test/raw_pure_test.cmi test/raw_pure_test.cmj test/rbset.cmi test/rbset.cmj test/react.cmi test/react.cmj test/reactDOMRe.cmi test/reactDOMRe.cmj test/reactDOMServerRe.cmi test/reactDOMServerRe.cmj test/reactEvent.cmi test/reactEvent.cmj test/reactTestUtils.cmi test/reactTestUtils.cmj test/reasonReact.cmi test/reasonReact.cmj test/reasonReactCompat.cmi test/reasonReactCompat.cmj test/reasonReactOptimizedCreateClass.cmi test/reasonReactOptimizedCreateClass.cmj test/reasonReactRouter.cmi test/reasonReactRouter.cmj test/rebind_module.cmi test/rebind_module.cmj test/rebind_module_test.cmi test/rebind_module_test.cmj test/rec_array_test.cmi test/rec_array_test.cmj test/rec_fun_test.cmi test/rec_fun_test.cmj test/rec_module_opt.cmi test/rec_module_opt.cmj test/rec_module_test.cmi test/rec_module_test.cmj test/recmodule.cmi test/recmodule.cmj test/record_debug_test.cmi test/record_debug_test.cmj test/record_extension_test.cmi test/record_extension_test.cmj test/record_name_test.cmi test/record_name_test.cmj test/record_regression.cmi test/record_regression.cmj test/record_type_spread.cmi test/record_type_spread.cmj test/record_with_test.cmi test/record_with_test.cmj test/recursive_module.cmi test/recursive_module.cmj test/recursive_module_test.cmi test/recursive_module_test.cmj test/recursive_react_component.cmi test/recursive_react_component.cmj test/recursive_records_test.cmi test/recursive_records_test.cmj test/recursive_unbound_module_test.cmi test/recursive_unbound_module_test.cmj test/regression_print.cmi test/regression_print.cmj test/relative_path.cmi test/relative_path.cmj test/res_debug.cmi test/res_debug.cmj test/return_check.cmi test/return_check.cmj test/runtime_encoding_test.cmi test/runtime_encoding_test.cmj test/set_annotation.cmi test/set_annotation.cmj test/set_gen.cmi test/set_gen.cmj test/sexp.cmi test/sexp.cmj test/sexpm.cmi test/sexpm.cmj test/sexpm_test.cmi test/sexpm_test.cmj test/side_effect.cmi test/side_effect.cmj test/side_effect2.cmi test/side_effect2.cmj test/side_effect_free.cmi test/side_effect_free.cmj test/simplify_lambda_632o.cmi test/simplify_lambda_632o.cmj test/single_module_alias.cmi test/single_module_alias.cmj test/singular_unit_test.cmi test/singular_unit_test.cmj test/small_inline_test.cmi test/small_inline_test.cmj test/splice_test.cmi test/splice_test.cmj test/stack_comp_test.cmi test/stack_comp_test.cmj test/stack_test.cmi test/stack_test.cmj test/stream_parser_test.cmi test/stream_parser_test.cmj test/string_bound_get_test.cmi test/string_bound_get_test.cmj test/string_constant_compare.cmi test/string_constant_compare.cmj test/string_get_set_test.cmi test/string_get_set_test.cmj test/string_runtime_test.cmi test/string_runtime_test.cmj test/string_set.cmi test/string_set.cmj test/string_set_test.cmi test/string_set_test.cmj test/string_test.cmi test/string_test.cmj test/string_unicode_test.cmi test/string_unicode_test.cmj test/stringmatch_test.cmi test/stringmatch_test.cmj test/submodule.cmi test/submodule.cmj test/submodule_call.cmi test/submodule_call.cmj test/switch_case_test.cmi test/switch_case_test.cmj test/switch_string.cmi test/switch_string.cmj test/tagged_template_test.cmi test/tagged_template_test.cmj test/tailcall_inline_test.cmi test/tailcall_inline_test.cmj test/template.cmi test/template.cmj test/test.cmi test/test.cmj test/test2.cmi test/test2.cmj test/test_alias.cmi test/test_alias.cmj test/test_ari.cmi test/test_ari.cmj test/test_array.cmi test/test_array.cmj test/test_array_append.cmi test/test_array_append.cmj test/test_array_primitive.cmi test/test_array_primitive.cmj test/test_bool_equal.cmi test/test_bool_equal.cmj test/test_bs_this.cmi test/test_bs_this.cmj test/test_bug.cmi test/test_bug.cmj test/test_bytes.cmi test/test_bytes.cmj test/test_case_opt_collision.cmi test/test_case_opt_collision.cmj test/test_case_set.cmi test/test_case_set.cmj test/test_char.cmi test/test_char.cmj test/test_closure.cmi test/test_closure.cmj test/test_common.cmi test/test_common.cmj test/test_const_elim.cmi test/test_const_elim.cmj test/test_const_propogate.cmi test/test_const_propogate.cmj test/test_cpp.cmi test/test_cpp.cmj test/test_cps.cmi test/test_cps.cmj test/test_demo.cmi test/test_demo.cmj test/test_dup_param.cmi test/test_dup_param.cmj test/test_eq.cmi test/test_eq.cmj test/test_exception.cmi test/test_exception.cmj test/test_exception_escape.cmi test/test_exception_escape.cmj test/test_export2.cmi test/test_export2.cmj test/test_external.cmi test/test_external.cmj test/test_external_unit.cmi test/test_external_unit.cmj test/test_ffi.cmi test/test_ffi.cmj test/test_fib.cmi test/test_fib.cmj test/test_filename.cmi test/test_filename.cmj test/test_for_loop.cmi test/test_for_loop.cmj test/test_for_map.cmi test/test_for_map.cmj test/test_for_map2.cmi test/test_for_map2.cmj test/test_format.cmi test/test_format.cmj test/test_formatter.cmi test/test_formatter.cmj test/test_functor_dead_code.cmi test/test_functor_dead_code.cmj test/test_generative_module.cmi test/test_generative_module.cmj test/test_global_print.cmi test/test_global_print.cmj test/test_google_closure.cmi test/test_google_closure.cmj test/test_include.cmi test/test_include.cmj test/test_incomplete.cmi test/test_incomplete.cmj test/test_incr_ref.cmi test/test_incr_ref.cmj test/test_int_map_find.cmi test/test_int_map_find.cmj test/test_internalOO.cmi test/test_internalOO.cmj test/test_is_js.cmi test/test_is_js.cmj test/test_js_ffi.cmi test/test_js_ffi.cmj test/test_let.cmi test/test_let.cmj test/test_list.cmi test/test_list.cmj test/test_literal.cmi test/test_literal.cmj test/test_literals.cmi test/test_literals.cmj test/test_match_exception.cmi test/test_match_exception.cmj test/test_mutliple.cmi test/test_mutliple.cmj test/test_nat64.cmi test/test_nat64.cmj test/test_nested_let.cmi test/test_nested_let.cmj test/test_nested_print.cmi test/test_nested_print.cmj test/test_non_export.cmi test/test_non_export.cmj test/test_nullary.cmi test/test_nullary.cmj test/test_obj.cmi test/test_obj.cmj test/test_order.cmi test/test_order.cmj test/test_order_tailcall.cmi test/test_order_tailcall.cmj test/test_other_exn.cmi test/test_other_exn.cmj test/test_pack.cmi test/test_pack.cmj test/test_per.cmi test/test_per.cmj test/test_pervasive.cmi test/test_pervasive.cmj test/test_pervasives2.cmi test/test_pervasives2.cmj test/test_pervasives3.cmi test/test_pervasives3.cmj test/test_primitive.cmi test/test_primitive.cmj test/test_ramification.cmi test/test_ramification.cmj test/test_react.cmi test/test_react.cmj test/test_react_case.cmi test/test_react_case.cmj test/test_regex.cmi test/test_regex.cmj test/test_runtime_encoding.cmi test/test_runtime_encoding.cmj test/test_scope.cmi test/test_scope.cmj test/test_seq.cmi test/test_seq.cmj test/test_set.cmi test/test_set.cmj test/test_side_effect_functor.cmi test/test_side_effect_functor.cmj test/test_simple_include.cmi test/test_simple_include.cmj test/test_simple_pattern_match.cmi test/test_simple_pattern_match.cmj test/test_simple_ref.cmi test/test_simple_ref.cmj test/test_simple_tailcall.cmi test/test_simple_tailcall.cmj test/test_small.cmi test/test_small.cmj test/test_sprintf.cmi test/test_sprintf.cmj test/test_stack.cmi test/test_stack.cmj test/test_static_catch_ident.cmi test/test_static_catch_ident.cmj test/test_string.cmi test/test_string.cmj test/test_string_case.cmi test/test_string_case.cmj test/test_string_const.cmi test/test_string_const.cmj test/test_string_map.cmi test/test_string_map.cmj test/test_string_switch.cmi test/test_string_switch.cmj test/test_switch.cmi test/test_switch.cmj test/test_trywith.cmi test/test_trywith.cmj test/test_tuple.cmi test/test_tuple.cmj test/test_tuple_destructring.cmi test/test_tuple_destructring.cmj test/test_type_based_arity.cmi test/test_type_based_arity.cmj test/test_u.cmi test/test_u.cmj test/test_unknown.cmi test/test_unknown.cmj test/test_unsafe_cmp.cmi test/test_unsafe_cmp.cmj test/test_unsafe_obj_ffi.cmi test/test_unsafe_obj_ffi.cmj test/test_unsafe_obj_ffi_ppx.cmi test/test_unsafe_obj_ffi_ppx.cmj test/test_unsupported_primitive.cmi test/test_unsupported_primitive.cmj test/test_while_closure.cmi test/test_while_closure.cmj test/test_while_side_effect.cmi test/test_while_side_effect.cmj test/test_zero_nullable.cmi test/test_zero_nullable.cmj test/then_mangle_test.cmi test/then_mangle_test.cmj test/ticker.cmi test/ticker.cmj test/to_string_test.cmi test/to_string_test.cmj test/topsort_test.cmi test/topsort_test.cmj test/tramp_fib.cmi test/tramp_fib.cmj test/tuple_alloc.cmi test/tuple_alloc.cmj test/type-coercion-free-vars.cmi test/type-coercion-free-vars.cmj test/type_disambiguate.cmi test/type_disambiguate.cmj test/typeof_test.cmi test/typeof_test.cmj test/unboxed_attribute.cmi test/unboxed_attribute.cmj test/unboxed_attribute_test.cmi test/unboxed_attribute_test.cmj test/unboxed_crash.cmi test/unboxed_crash.cmj test/unboxed_use_case.cmi test/unboxed_use_case.cmj test/uncurried_cast.cmi test/uncurried_cast.cmj test/uncurried_default.args.cmi test/uncurried_default.args.cmj test/uncurried_pipe.cmi test/uncurried_pipe.cmj test/uncurry_external_test.cmi test/uncurry_external_test.cmj test/uncurry_glob_test.cmi test/uncurry_glob_test.cmj test/uncurry_test.cmi test/uncurry_test.cmj test/undef_regression2_test.cmi test/undef_regression2_test.cmj test/undef_regression_test.cmi test/undef_regression_test.cmj test/undefine_conditional.cmi test/undefine_conditional.cmj test/unicode_type_error.cmi test/unicode_type_error.cmj test/unit_undefined_test.cmi test/unit_undefined_test.cmj test/unitest_string.cmi test/unitest_string.cmj test/unsafe_full_apply_primitive.cmi test/unsafe_full_apply_primitive.cmj test/unsafe_ppx_test.cmi test/unsafe_ppx_test.cmj test/update_record_test.cmi test/update_record_test.cmj test/variant.cmi test/variant.cmj test/variantsMatching.cmi test/variantsMatching.cmj test/webpack_config.cmi test/webpack_config.cmj +o test : phony test/406_primitive_test.cmi test/406_primitive_test.cmj test/AsInUncurriedExternals.cmi test/AsInUncurriedExternals.cmj test/Coercion.cmi test/Coercion.cmj test/DerivingAccessorsCurried.cmi test/DerivingAccessorsCurried.cmj test/DerivingAccessorsUncurried.cmi test/DerivingAccessorsUncurried.cmj test/DictInference.cmi test/DictInference.cmj test/DisambiguateOptionalFields.cmi test/DisambiguateOptionalFields.cmj test/DotDotDot.cmi test/DotDotDot.cmj test/EmptyRecord.cmi test/EmptyRecord.cmj test/ExternalArity.cmi test/ExternalArity.cmj test/FFI.cmi test/FFI.cmj test/Import.cmi test/Import.cmj test/ImportAttributes.cmi test/ImportAttributes.cmj test/PartialApplicationNoRuntimeCurry.cmi test/PartialApplicationNoRuntimeCurry.cmj test/RecordCoercion.cmi test/RecordCoercion.cmj test/RecordOrObject.cmi test/RecordOrObject.cmj test/SafePromises.cmi test/SafePromises.cmj test/UncurriedAlways.cmi test/UncurriedAlways.cmj test/UncurriedExternals.cmi test/UncurriedExternals.cmj test/UncurriedPervasives.cmi test/UncurriedPervasives.cmj test/UntaggedVariants.cmi test/UntaggedVariants.cmj test/VariantCoercion.cmi test/VariantCoercion.cmj test/VariantSpreads.cmi test/VariantSpreads.cmj test/a.cmi test/a.cmj test/a_filename_test.cmi test/a_filename_test.cmj test/a_list_test.cmi test/a_list_test.cmj test/a_recursive_type.cmi test/a_recursive_type.cmj test/a_scope_bug.cmi test/a_scope_bug.cmj test/a_string_test.cmi test/a_string_test.cmj test/abstract_type.cmi test/abstract_type.cmj test/adt_optimize_test.cmi test/adt_optimize_test.cmj test/alias_default_value_test.cmi test/alias_default_value_test.cmj test/alias_test.cmi test/alias_test.cmj test/and_or_tailcall_test.cmi test/and_or_tailcall_test.cmj test/argv_test.cmi test/argv_test.cmj test/ari_regress_test.cmi test/ari_regress_test.cmj test/arith_lexer.cmi test/arith_lexer.cmj test/arith_parser.cmi test/arith_parser.cmj test/arith_syntax.cmi test/arith_syntax.cmj test/arity.cmi test/arity.cmj test/arity_deopt.cmi test/arity_deopt.cmj test/arity_infer.cmi test/arity_infer.cmj test/array_data_util.cmi test/array_data_util.cmj test/array_safe_get.cmi test/array_safe_get.cmj test/array_subtle_test.cmi test/array_subtle_test.cmj test/array_test.cmi test/array_test.cmj test/as_inline_record_test.cmi test/as_inline_record_test.cmj test/ast_abstract_test.cmi test/ast_abstract_test.cmj test/ast_mapper_unused_warning_test.cmi test/ast_mapper_unused_warning_test.cmj test/async_await.cmi test/async_await.cmj test/async_ideas.cmi test/async_ideas.cmj test/async_inline.cmi test/async_inline.cmj test/async_inside_loop.cmi test/async_inside_loop.cmj test/attr_test.cmi test/attr_test.cmj test/b.cmi test/b.cmj test/bal_set_mini.cmi test/bal_set_mini.cmj test/bang_primitive.cmi test/bang_primitive.cmj test/basic_module_test.cmi test/basic_module_test.cmj test/bb.cmi test/bb.cmj test/bdd.cmi test/bdd.cmj test/belt_internal_test.cmi test/belt_internal_test.cmj test/belt_result_alias_test.cmi test/belt_result_alias_test.cmj test/bench.cmi test/bench.cmj test/big_enum.cmi test/big_enum.cmj test/big_polyvar_test.cmi test/big_polyvar_test.cmj test/bigint_test.cmi test/bigint_test.cmj test/block_alias_test.cmi test/block_alias_test.cmj test/boolean_test.cmi test/boolean_test.cmj test/bs_MapInt_test.cmi test/bs_MapInt_test.cmj test/bs_abstract_test.cmi test/bs_abstract_test.cmj test/bs_array_test.cmi test/bs_array_test.cmj test/bs_auto_uncurry.cmi test/bs_auto_uncurry.cmj test/bs_auto_uncurry_test.cmi test/bs_auto_uncurry_test.cmj test/bs_float_test.cmi test/bs_float_test.cmj test/bs_hashmap_test.cmi test/bs_hashmap_test.cmj test/bs_hashset_int_test.cmi test/bs_hashset_int_test.cmj test/bs_hashtbl_string_test.cmi test/bs_hashtbl_string_test.cmj test/bs_ignore_effect.cmi test/bs_ignore_effect.cmj test/bs_ignore_test.cmi test/bs_ignore_test.cmj test/bs_int_test.cmi test/bs_int_test.cmj test/bs_list_test.cmi test/bs_list_test.cmj test/bs_map_set_dict_test.cmi test/bs_map_set_dict_test.cmj test/bs_map_test.cmi test/bs_map_test.cmj test/bs_min_max_test.cmi test/bs_min_max_test.cmj test/bs_mutable_set_test.cmi test/bs_mutable_set_test.cmj test/bs_poly_map_test.cmi test/bs_poly_map_test.cmj test/bs_poly_mutable_map_test.cmi test/bs_poly_mutable_map_test.cmj test/bs_poly_mutable_set_test.cmi test/bs_poly_mutable_set_test.cmj test/bs_poly_set_test.cmi test/bs_poly_set_test.cmj test/bs_qualified.cmi test/bs_qualified.cmj test/bs_queue_test.cmi test/bs_queue_test.cmj test/bs_rbset_int_bench.cmi test/bs_rbset_int_bench.cmj test/bs_rest_test.cmi test/bs_rest_test.cmj test/bs_set_bench.cmi test/bs_set_bench.cmj test/bs_set_int_test.cmi test/bs_set_int_test.cmj test/bs_sort_test.cmi test/bs_sort_test.cmj test/bs_splice_partial.cmi test/bs_splice_partial.cmj test/bs_stack_test.cmi test/bs_stack_test.cmj test/bs_string_test.cmi test/bs_string_test.cmj test/bs_unwrap_test.cmi test/bs_unwrap_test.cmj test/buffer_test.cmi test/buffer_test.cmj test/bytes_split_gpr_743_test.cmi test/bytes_split_gpr_743_test.cmj test/caml_compare_bigint_test.cmi test/caml_compare_bigint_test.cmj test/caml_compare_test.cmi test/caml_compare_test.cmj test/caml_format_test.cmi test/caml_format_test.cmj test/chain_code_test.cmi test/chain_code_test.cmj test/chn_test.cmi test/chn_test.cmj test/class_type_ffi_test.cmi test/class_type_ffi_test.cmj test/coercion_module_alias_test.cmi test/coercion_module_alias_test.cmj test/compare_test.cmi test/compare_test.cmj test/complete_parmatch_test.cmi test/complete_parmatch_test.cmj test/complex_if_test.cmi test/complex_if_test.cmj test/complex_test.cmi test/complex_test.cmj test/complex_while_loop.cmi test/complex_while_loop.cmj test/condition_compilation_test.cmi test/condition_compilation_test.cmj test/config1_test.cmi test/config1_test.cmj test/console_log_test.cmi test/console_log_test.cmj test/const_block_test.cmi test/const_block_test.cmj test/const_defs.cmi test/const_defs.cmj test/const_defs_test.cmi test/const_defs_test.cmj test/const_test.cmi test/const_test.cmj test/cont_int_fold_test.cmi test/cont_int_fold_test.cmj test/cps_test.cmi test/cps_test.cmj test/cross_module_inline_test.cmi test/cross_module_inline_test.cmj test/custom_error_test.cmi test/custom_error_test.cmj test/debug_keep_test.cmi test/debug_keep_test.cmj test/debug_mode_value.cmi test/debug_mode_value.cmj test/debug_tmp.cmi test/debug_tmp.cmj test/debugger_test.cmi test/debugger_test.cmj test/default_export_test.cmi test/default_export_test.cmj test/defunctor_make_test.cmi test/defunctor_make_test.cmj test/demo_int_map.cmi test/demo_int_map.cmj test/demo_page.cmi test/demo_page.cmj test/demo_pipe.cmi test/demo_pipe.cmj test/derive_projector_test.cmi test/derive_projector_test.cmj test/digest_test.cmi test/digest_test.cmj test/directives.cmi test/directives.cmj test/div_by_zero_test.cmi test/div_by_zero_test.cmj test/dollar_escape_test.cmi test/dollar_escape_test.cmj test/earger_curry_test.cmi test/earger_curry_test.cmj test/effect.cmi test/effect.cmj test/epsilon_test.cmi test/epsilon_test.cmj test/equal_box_test.cmi test/equal_box_test.cmj test/equal_exception_test.cmi test/equal_exception_test.cmj test/equal_test.cmi test/equal_test.cmj test/es6_export.cmi test/es6_export.cmj test/es6_import.cmi test/es6_import.cmj test/es6_module_test.cmi test/es6_module_test.cmj test/escape_esmodule.cmi test/escape_esmodule.cmj test/esmodule_ref.cmi test/esmodule_ref.cmj test/event_ffi.cmi test/event_ffi.cmj test/exception_alias.cmi test/exception_alias.cmj test/exception_raise_test.cmi test/exception_raise_test.cmj test/exception_rebound_err_test.cmi test/exception_rebound_err_test.cmj test/exception_value_test.cmi test/exception_value_test.cmj test/exotic_labels_test.cmi test/exotic_labels_test.cmj test/exponentiation_precedence_test.cmi test/exponentiation_precedence_test.cmj test/export_keyword.cmi test/export_keyword.cmj test/ext_array_test.cmi test/ext_array_test.cmj test/ext_bytes_test.cmi test/ext_bytes_test.cmj test/ext_filename_test.cmi test/ext_filename_test.cmj test/ext_list_test.cmi test/ext_list_test.cmj test/ext_pervasives_test.cmi test/ext_pervasives_test.cmj test/ext_string_test.cmi test/ext_string_test.cmj test/ext_sys_test.cmi test/ext_sys_test.cmj test/extensible_variant_test.cmi test/extensible_variant_test.cmj test/external_polyfill_test.cmi test/external_polyfill_test.cmj test/external_ppx.cmi test/external_ppx.cmj test/external_ppx2.cmi test/external_ppx2.cmj test/fail_comp.cmi test/fail_comp.cmj test/ffi_arity_test.cmi test/ffi_arity_test.cmj test/ffi_array_test.cmi test/ffi_array_test.cmj test/ffi_js_test.cmi test/ffi_js_test.cmj test/ffi_splice_test.cmi test/ffi_splice_test.cmj test/ffi_test.cmi test/ffi_test.cmj test/fib.cmi test/fib.cmj test/flattern_order_test.cmi test/flattern_order_test.cmj test/flexible_array_test.cmi test/flexible_array_test.cmj test/float_array.cmi test/float_array.cmj test/float_of_bits_test.cmi test/float_of_bits_test.cmj test/float_record.cmi test/float_record.cmj test/float_test.cmi test/float_test.cmj test/floatarray_test.cmi test/floatarray_test.cmj test/for_loop_test.cmi test/for_loop_test.cmj test/for_side_effect_test.cmi test/for_side_effect_test.cmj test/format_regression.cmi test/format_regression.cmj test/format_test.cmi test/format_test.cmj test/fun_pattern_match.cmi test/fun_pattern_match.cmj test/function_directives.cmi test/function_directives.cmj test/function_directives_no_inline.cmi test/function_directives_no_inline.cmj test/functor_app_test.cmi test/functor_app_test.cmj test/functor_def.cmi test/functor_def.cmj test/functor_ffi.cmi test/functor_ffi.cmj test/functor_inst.cmi test/functor_inst.cmj test/functors.cmi test/functors.cmj test/gbk.cmi test/gbk.cmj test/genlex_test.cmi test/genlex_test.cmj test/gentTypeReTest.cmi test/gentTypeReTest.cmj test/global_exception_regression_test.cmi test/global_exception_regression_test.cmj test/global_mangles.cmi test/global_mangles.cmj test/global_module_alias_test.cmi test/global_module_alias_test.cmj test/google_closure_test.cmi test/google_closure_test.cmj test/gpr496_test.cmi test/gpr496_test.cmj test/gpr_1072.cmi test/gpr_1072.cmj test/gpr_1072_reg.cmi test/gpr_1072_reg.cmj test/gpr_1150.cmi test/gpr_1150.cmj test/gpr_1154_test.cmi test/gpr_1154_test.cmj test/gpr_1170.cmi test/gpr_1170.cmj test/gpr_1240_missing_unbox.cmi test/gpr_1240_missing_unbox.cmj test/gpr_1245_test.cmi test/gpr_1245_test.cmj test/gpr_1268.cmi test/gpr_1268.cmj test/gpr_1409_test.cmi test/gpr_1409_test.cmj test/gpr_1423_app_test.cmi test/gpr_1423_app_test.cmj test/gpr_1423_nav.cmi test/gpr_1423_nav.cmj test/gpr_1438.cmi test/gpr_1438.cmj test/gpr_1481.cmi test/gpr_1481.cmj test/gpr_1484.cmi test/gpr_1484.cmj test/gpr_1503_test.cmi test/gpr_1503_test.cmj test/gpr_1539_test.cmi test/gpr_1539_test.cmj test/gpr_1658_test.cmi test/gpr_1658_test.cmj test/gpr_1667_test.cmi test/gpr_1667_test.cmj test/gpr_1692_test.cmi test/gpr_1692_test.cmj test/gpr_1698_test.cmi test/gpr_1698_test.cmj test/gpr_1701_test.cmi test/gpr_1701_test.cmj test/gpr_1716_test.cmi test/gpr_1716_test.cmj test/gpr_1717_test.cmi test/gpr_1717_test.cmj test/gpr_1728_test.cmi test/gpr_1728_test.cmj test/gpr_1749_test.cmi test/gpr_1749_test.cmj test/gpr_1759_test.cmi test/gpr_1759_test.cmj test/gpr_1760_test.cmi test/gpr_1760_test.cmj test/gpr_1762_test.cmi test/gpr_1762_test.cmj test/gpr_1817_test.cmi test/gpr_1817_test.cmj test/gpr_1822_test.cmi test/gpr_1822_test.cmj test/gpr_1891_test.cmi test/gpr_1891_test.cmj test/gpr_1943_test.cmi test/gpr_1943_test.cmj test/gpr_1946_test.cmi test/gpr_1946_test.cmj test/gpr_2316_test.cmi test/gpr_2316_test.cmj test/gpr_2352_test.cmi test/gpr_2352_test.cmj test/gpr_2413_test.cmi test/gpr_2413_test.cmj test/gpr_2474.cmi test/gpr_2474.cmj test/gpr_2487.cmi test/gpr_2487.cmj test/gpr_2503_test.cmi test/gpr_2503_test.cmj test/gpr_2608_test.cmi test/gpr_2608_test.cmj test/gpr_2614_test.cmi test/gpr_2614_test.cmj test/gpr_2633_test.cmi test/gpr_2633_test.cmj test/gpr_2642_test.cmi test/gpr_2642_test.cmj test/gpr_2682_test.cmi test/gpr_2682_test.cmj test/gpr_2700_test.cmi test/gpr_2700_test.cmj test/gpr_2731_test.cmi test/gpr_2731_test.cmj test/gpr_2789_test.cmi test/gpr_2789_test.cmj test/gpr_2931_test.cmi test/gpr_2931_test.cmj test/gpr_3142_test.cmi test/gpr_3142_test.cmj test/gpr_3154_test.cmi test/gpr_3154_test.cmj test/gpr_3209_test.cmi test/gpr_3209_test.cmj test/gpr_3492_test.cmi test/gpr_3492_test.cmj test/gpr_3519_jsx_test.cmi test/gpr_3519_jsx_test.cmj test/gpr_3519_test.cmi test/gpr_3519_test.cmj test/gpr_3536_test.cmi test/gpr_3536_test.cmj test/gpr_3546_test.cmi test/gpr_3546_test.cmj test/gpr_3548_test.cmi test/gpr_3548_test.cmj test/gpr_3549_test.cmi test/gpr_3549_test.cmj test/gpr_3566_drive_test.cmi test/gpr_3566_drive_test.cmj test/gpr_3566_test.cmi test/gpr_3566_test.cmj test/gpr_3595_test.cmi test/gpr_3595_test.cmj test/gpr_3609_test.cmi test/gpr_3609_test.cmj test/gpr_3697_test.cmi test/gpr_3697_test.cmj test/gpr_373_test.cmi test/gpr_373_test.cmj test/gpr_3770_test.cmi test/gpr_3770_test.cmj test/gpr_3852_alias.cmi test/gpr_3852_alias.cmj test/gpr_3852_alias_reify.cmi test/gpr_3852_alias_reify.cmj test/gpr_3852_effect.cmi test/gpr_3852_effect.cmj test/gpr_3865.cmi test/gpr_3865.cmj test/gpr_3865_bar.cmi test/gpr_3865_bar.cmj test/gpr_3865_foo.cmi test/gpr_3865_foo.cmj test/gpr_3875_test.cmi test/gpr_3875_test.cmj test/gpr_3877_test.cmi test/gpr_3877_test.cmj test/gpr_3895_test.cmi test/gpr_3895_test.cmj test/gpr_3897_test.cmi test/gpr_3897_test.cmj test/gpr_3931_test.cmi test/gpr_3931_test.cmj test/gpr_3980_test.cmi test/gpr_3980_test.cmj test/gpr_4025_test.cmi test/gpr_4025_test.cmj test/gpr_405_test.cmi test/gpr_405_test.cmj test/gpr_4069_test.cmi test/gpr_4069_test.cmj test/gpr_4265_test.cmi test/gpr_4265_test.cmj test/gpr_4274_test.cmi test/gpr_4274_test.cmj test/gpr_4280_test.cmi test/gpr_4280_test.cmj test/gpr_4407_test.cmi test/gpr_4407_test.cmj test/gpr_441.cmi test/gpr_441.cmj test/gpr_4442_test.cmi test/gpr_4442_test.cmj test/gpr_4491_test.cmi test/gpr_4491_test.cmj test/gpr_4494_test.cmi test/gpr_4494_test.cmj test/gpr_4519_test.cmi test/gpr_4519_test.cmj test/gpr_459_test.cmi test/gpr_459_test.cmj test/gpr_4632.cmi test/gpr_4632.cmj test/gpr_4639_test.cmi test/gpr_4639_test.cmj test/gpr_4900_test.cmi test/gpr_4900_test.cmj test/gpr_4924_test.cmi test/gpr_4924_test.cmj test/gpr_4931.cmi test/gpr_4931.cmj test/gpr_4931_allow.cmi test/gpr_4931_allow.cmj test/gpr_5071_test.cmi test/gpr_5071_test.cmj test/gpr_5169_test.cmi test/gpr_5169_test.cmj test/gpr_5218_test.cmi test/gpr_5218_test.cmj test/gpr_5280_optimize_test.cmi test/gpr_5280_optimize_test.cmj test/gpr_5557.cmi test/gpr_5557.cmj test/gpr_5753.cmi test/gpr_5753.cmj test/gpr_658.cmi test/gpr_658.cmj test/gpr_858_test.cmi test/gpr_858_test.cmj test/gpr_858_unit2_test.cmi test/gpr_858_unit2_test.cmj test/gpr_904_test.cmi test/gpr_904_test.cmj test/gpr_974_test.cmi test/gpr_974_test.cmj test/gpr_977_test.cmi test/gpr_977_test.cmj test/gpr_return_type_unused_attribute.cmi test/gpr_return_type_unused_attribute.cmj test/gray_code_test.cmi test/gray_code_test.cmj test/guide_for_ext.cmi test/guide_for_ext.cmj test/hash_collision_test.cmi test/hash_collision_test.cmj test/hash_sugar_desugar.cmi test/hash_sugar_desugar.cmj test/hash_test.cmi test/hash_test.cmj test/hashtbl_test.cmi test/hashtbl_test.cmj test/hello.foo.cmi test/hello.foo.cmj test/hello_res.cmi test/hello_res.cmj test/ignore_test.cmi test/ignore_test.cmj test/ignore_uncurry_attribute.cmi test/ignore_uncurry_attribute.cmj test/imm_map_bench.cmi test/imm_map_bench.cmj test/import2.cmi test/import2.cmj test/import_external.cmi test/import_external.cmj test/import_side_effect.cmi test/import_side_effect.cmj test/import_side_effect_free.cmi test/import_side_effect_free.cmj test/include_side_effect.cmi test/include_side_effect.cmj test/include_side_effect_free.cmi test/include_side_effect_free.cmj test/incomplete_toplevel_test.cmi test/incomplete_toplevel_test.cmj test/infer_type_test.cmi test/infer_type_test.cmj test/inline_condition_with_pattern_matching.cmi test/inline_condition_with_pattern_matching.cmj test/inline_const.cmi test/inline_const.cmj test/inline_const_test.cmi test/inline_const_test.cmj test/inline_edge_cases.cmi test/inline_edge_cases.cmj test/inline_map2_test.cmi test/inline_map2_test.cmj test/inline_map_demo.cmi test/inline_map_demo.cmj test/inline_map_test.cmi test/inline_map_test.cmj test/inline_record_test.cmi test/inline_record_test.cmj test/inline_regression_test.cmi test/inline_regression_test.cmj test/inline_string_test.cmi test/inline_string_test.cmj test/inner_call.cmi test/inner_call.cmj test/inner_define.cmi test/inner_define.cmj test/inner_unused.cmi test/inner_unused.cmj test/installation_test.cmi test/installation_test.cmj test/int32_test.cmi test/int32_test.cmj test/int64_mul_div_test.cmi test/int64_mul_div_test.cmj test/int64_string_bench.cmi test/int64_string_bench.cmj test/int64_string_test.cmi test/int64_string_test.cmj test/int64_test.cmi test/int64_test.cmj test/int_hashtbl_test.cmi test/int_hashtbl_test.cmj test/int_map.cmi test/int_map.cmj test/int_overflow_test.cmi test/int_overflow_test.cmj test/int_poly_var.cmi test/int_poly_var.cmj test/int_switch_test.cmi test/int_switch_test.cmj test/internal_unused_test.cmi test/internal_unused_test.cmj test/io_test.cmi test/io_test.cmj test/js_array_test.cmi test/js_array_test.cmj test/js_bool_test.cmi test/js_bool_test.cmj test/js_cast_test.cmi test/js_cast_test.cmj test/js_date_test.cmi test/js_date_test.cmj test/js_dict_test.cmi test/js_dict_test.cmj test/js_exception_catch_test.cmi test/js_exception_catch_test.cmj test/js_float_test.cmi test/js_float_test.cmj test/js_global_test.cmi test/js_global_test.cmj test/js_int_test.cmi test/js_int_test.cmj test/js_json_test.cmi test/js_json_test.cmj test/js_math_test.cmi test/js_math_test.cmj test/js_null_test.cmi test/js_null_test.cmj test/js_null_undefined_test.cmi test/js_null_undefined_test.cmj test/js_nullable_test.cmi test/js_nullable_test.cmj test/js_obj_test.cmi test/js_obj_test.cmj test/js_option_test.cmi test/js_option_test.cmj test/js_re_test.cmi test/js_re_test.cmj test/js_string_test.cmi test/js_string_test.cmj test/js_undefined_test.cmi test/js_undefined_test.cmj test/js_val.cmi test/js_val.cmj test/jsoo_400_test.cmi test/jsoo_400_test.cmj test/jsoo_485_test.cmi test/jsoo_485_test.cmj test/jsxv4_newtype.cmi test/jsxv4_newtype.cmj test/keep_uncurry_attribute.cmi test/keep_uncurry_attribute.cmj test/key_word_property.cmi test/key_word_property.cmj test/key_word_property2.cmi test/key_word_property2.cmj test/key_word_property_plus_test.cmi test/key_word_property_plus_test.cmj test/label_uncurry.cmi test/label_uncurry.cmj test/large_integer_pat.cmi test/large_integer_pat.cmj test/large_record_duplication_test.cmi test/large_record_duplication_test.cmj test/largest_int_flow.cmi test/largest_int_flow.cmj test/lazy_demo.cmi test/lazy_demo.cmj test/lazy_test.cmi test/lazy_test.cmj test/lib_js_test.cmi test/lib_js_test.cmj test/libarg_test.cmi test/libarg_test.cmj test/libqueue_test.cmi test/libqueue_test.cmj test/limits_test.cmi test/limits_test.cmj test/list_stack.cmi test/list_stack.cmj test/list_test.cmi test/list_test.cmj test/local_exception_test.cmi test/local_exception_test.cmj test/loop_regression_test.cmi test/loop_regression_test.cmj test/loop_suites_test.cmi test/loop_suites_test.cmj test/map_find_test.cmi test/map_find_test.cmj test/map_test.cmi test/map_test.cmj test/mario_game.cmi test/mario_game.cmj test/marshal.cmi test/marshal.cmj test/meth_annotation.cmi test/meth_annotation.cmj test/method_name_test.cmi test/method_name_test.cmj test/method_string_name.cmi test/method_string_name.cmj test/minimal_test.cmi test/minimal_test.cmj test/miss_colon_test.cmi test/miss_colon_test.cmj test/mock_mt.cmi test/mock_mt.cmj test/module_alias_test.cmi test/module_alias_test.cmj test/module_as_class_ffi.cmi test/module_as_class_ffi.cmj test/module_as_function.cmi test/module_as_function.cmj test/module_missing_conversion.cmi test/module_missing_conversion.cmj test/module_parameter_test.cmi test/module_parameter_test.cmj test/module_splice_test.cmi test/module_splice_test.cmj test/more_poly_variant_test.cmi test/more_poly_variant_test.cmj test/more_uncurry.cmi test/more_uncurry.cmj test/mpr_6033_test.cmi test/mpr_6033_test.cmj test/mt.cmi test/mt.cmj test/mt_global.cmi test/mt_global.cmj test/mutable_obj_test.cmi test/mutable_obj_test.cmj test/mutable_uncurry_test.cmi test/mutable_uncurry_test.cmj test/mutual_non_recursive_type.cmi test/mutual_non_recursive_type.cmj test/name_mangle_test.cmi test/name_mangle_test.cmj test/nested_include.cmi test/nested_include.cmj test/nested_module_alias.cmi test/nested_module_alias.cmj test/nested_obj_literal.cmi test/nested_obj_literal.cmj test/nested_obj_test.cmi test/nested_obj_test.cmj test/nested_pattern_match_test.cmi test/nested_pattern_match_test.cmj test/noassert.cmi test/noassert.cmj test/node_path_test.cmi test/node_path_test.cmj test/null_list_test.cmi test/null_list_test.cmj test/number_lexer.cmi test/number_lexer.cmj test/obj_literal_ppx.cmi test/obj_literal_ppx.cmj test/obj_literal_ppx_test.cmi test/obj_literal_ppx_test.cmj test/obj_magic_test.cmi test/obj_magic_test.cmj test/obj_type_test.cmi test/obj_type_test.cmj test/ocaml_re_test.cmi test/ocaml_re_test.cmj test/of_string_test.cmi test/of_string_test.cmj test/offset.cmi test/offset.cmj test/omit_trailing_undefined_in_external_calls.cmi test/omit_trailing_undefined_in_external_calls.cmj test/option_encoding_test.cmi test/option_encoding_test.cmj test/option_record_none_test.cmi test/option_record_none_test.cmj test/option_repr_test.cmi test/option_repr_test.cmj test/optional_ffi_test.cmi test/optional_ffi_test.cmj test/optional_regression_test.cmi test/optional_regression_test.cmj test/pipe_send_readline.cmi test/pipe_send_readline.cmj test/pipe_syntax.cmi test/pipe_syntax.cmj test/poly_empty_array.cmi test/poly_empty_array.cmj test/poly_variant_test.cmi test/poly_variant_test.cmj test/polymorphic_raw_test.cmi test/polymorphic_raw_test.cmj test/polymorphism_test.cmi test/polymorphism_test.cmj test/polyvar_convert.cmi test/polyvar_convert.cmj test/polyvar_test.cmi test/polyvar_test.cmj test/ppx_apply_test.cmi test/ppx_apply_test.cmj test/pq_test.cmi test/pq_test.cmj test/pr6726.cmi test/pr6726.cmj test/prepend_data_ffi.cmi test/prepend_data_ffi.cmj test/primitive_reg_test.cmi test/primitive_reg_test.cmj test/print_alpha_test.cmi test/print_alpha_test.cmj test/queue_402.cmi test/queue_402.cmj test/queue_test.cmi test/queue_test.cmj test/random_test.cmi test/random_test.cmj test/raw_hash_tbl_bench.cmi test/raw_hash_tbl_bench.cmj test/raw_output_test.cmi test/raw_output_test.cmj test/raw_pure_test.cmi test/raw_pure_test.cmj test/rbset.cmi test/rbset.cmj test/react.cmi test/react.cmj test/reactDOMRe.cmi test/reactDOMRe.cmj test/reactDOMServerRe.cmi test/reactDOMServerRe.cmj test/reactEvent.cmi test/reactEvent.cmj test/reactTestUtils.cmi test/reactTestUtils.cmj test/reasonReact.cmi test/reasonReact.cmj test/reasonReactCompat.cmi test/reasonReactCompat.cmj test/reasonReactOptimizedCreateClass.cmi test/reasonReactOptimizedCreateClass.cmj test/reasonReactRouter.cmi test/reasonReactRouter.cmj test/rebind_module.cmi test/rebind_module.cmj test/rebind_module_test.cmi test/rebind_module_test.cmj test/rec_array_test.cmi test/rec_array_test.cmj test/rec_fun_test.cmi test/rec_fun_test.cmj test/rec_module_opt.cmi test/rec_module_opt.cmj test/rec_module_test.cmi test/rec_module_test.cmj test/recmodule.cmi test/recmodule.cmj test/record_debug_test.cmi test/record_debug_test.cmj test/record_extension_test.cmi test/record_extension_test.cmj test/record_name_test.cmi test/record_name_test.cmj test/record_regression.cmi test/record_regression.cmj test/record_type_spread.cmi test/record_type_spread.cmj test/record_with_test.cmi test/record_with_test.cmj test/recursive_module.cmi test/recursive_module.cmj test/recursive_module_test.cmi test/recursive_module_test.cmj test/recursive_react_component.cmi test/recursive_react_component.cmj test/recursive_records_test.cmi test/recursive_records_test.cmj test/recursive_unbound_module_test.cmi test/recursive_unbound_module_test.cmj test/regression_print.cmi test/regression_print.cmj test/relative_path.cmi test/relative_path.cmj test/res_debug.cmi test/res_debug.cmj test/return_check.cmi test/return_check.cmj test/runtime_encoding_test.cmi test/runtime_encoding_test.cmj test/set_annotation.cmi test/set_annotation.cmj test/set_gen.cmi test/set_gen.cmj test/sexp.cmi test/sexp.cmj test/sexpm.cmi test/sexpm.cmj test/sexpm_test.cmi test/sexpm_test.cmj test/side_effect.cmi test/side_effect.cmj test/side_effect2.cmi test/side_effect2.cmj test/side_effect_free.cmi test/side_effect_free.cmj test/simplify_lambda_632o.cmi test/simplify_lambda_632o.cmj test/single_module_alias.cmi test/single_module_alias.cmj test/singular_unit_test.cmi test/singular_unit_test.cmj test/small_inline_test.cmi test/small_inline_test.cmj test/splice_test.cmi test/splice_test.cmj test/stack_comp_test.cmi test/stack_comp_test.cmj test/stack_test.cmi test/stack_test.cmj test/stream_parser_test.cmi test/stream_parser_test.cmj test/string_bound_get_test.cmi test/string_bound_get_test.cmj test/string_constant_compare.cmi test/string_constant_compare.cmj test/string_get_set_test.cmi test/string_get_set_test.cmj test/string_runtime_test.cmi test/string_runtime_test.cmj test/string_set.cmi test/string_set.cmj test/string_set_test.cmi test/string_set_test.cmj test/string_test.cmi test/string_test.cmj test/string_unicode_test.cmi test/string_unicode_test.cmj test/stringmatch_test.cmi test/stringmatch_test.cmj test/submodule.cmi test/submodule.cmj test/submodule_call.cmi test/submodule_call.cmj test/switch_case_test.cmi test/switch_case_test.cmj test/switch_string.cmi test/switch_string.cmj test/tagged_template_test.cmi test/tagged_template_test.cmj test/tailcall_inline_test.cmi test/tailcall_inline_test.cmj test/template.cmi test/template.cmj test/test.cmi test/test.cmj test/test2.cmi test/test2.cmj test/test_alias.cmi test/test_alias.cmj test/test_ari.cmi test/test_ari.cmj test/test_array.cmi test/test_array.cmj test/test_array_append.cmi test/test_array_append.cmj test/test_array_primitive.cmi test/test_array_primitive.cmj test/test_bool_equal.cmi test/test_bool_equal.cmj test/test_bs_this.cmi test/test_bs_this.cmj test/test_bug.cmi test/test_bug.cmj test/test_bytes.cmi test/test_bytes.cmj test/test_case_opt_collision.cmi test/test_case_opt_collision.cmj test/test_case_set.cmi test/test_case_set.cmj test/test_char.cmi test/test_char.cmj test/test_closure.cmi test/test_closure.cmj test/test_common.cmi test/test_common.cmj test/test_const_elim.cmi test/test_const_elim.cmj test/test_const_propogate.cmi test/test_const_propogate.cmj test/test_cpp.cmi test/test_cpp.cmj test/test_cps.cmi test/test_cps.cmj test/test_demo.cmi test/test_demo.cmj test/test_dup_param.cmi test/test_dup_param.cmj test/test_eq.cmi test/test_eq.cmj test/test_exception.cmi test/test_exception.cmj test/test_exception_escape.cmi test/test_exception_escape.cmj test/test_export2.cmi test/test_export2.cmj test/test_external.cmi test/test_external.cmj test/test_external_unit.cmi test/test_external_unit.cmj test/test_ffi.cmi test/test_ffi.cmj test/test_fib.cmi test/test_fib.cmj test/test_filename.cmi test/test_filename.cmj test/test_for_loop.cmi test/test_for_loop.cmj test/test_for_map.cmi test/test_for_map.cmj test/test_for_map2.cmi test/test_for_map2.cmj test/test_format.cmi test/test_format.cmj test/test_formatter.cmi test/test_formatter.cmj test/test_functor_dead_code.cmi test/test_functor_dead_code.cmj test/test_generative_module.cmi test/test_generative_module.cmj test/test_global_print.cmi test/test_global_print.cmj test/test_google_closure.cmi test/test_google_closure.cmj test/test_include.cmi test/test_include.cmj test/test_incomplete.cmi test/test_incomplete.cmj test/test_incr_ref.cmi test/test_incr_ref.cmj test/test_int_map_find.cmi test/test_int_map_find.cmj test/test_internalOO.cmi test/test_internalOO.cmj test/test_is_js.cmi test/test_is_js.cmj test/test_js_ffi.cmi test/test_js_ffi.cmj test/test_let.cmi test/test_let.cmj test/test_list.cmi test/test_list.cmj test/test_literal.cmi test/test_literal.cmj test/test_literals.cmi test/test_literals.cmj test/test_match_exception.cmi test/test_match_exception.cmj test/test_mutliple.cmi test/test_mutliple.cmj test/test_nat64.cmi test/test_nat64.cmj test/test_nested_let.cmi test/test_nested_let.cmj test/test_nested_print.cmi test/test_nested_print.cmj test/test_non_export.cmi test/test_non_export.cmj test/test_nullary.cmi test/test_nullary.cmj test/test_obj.cmi test/test_obj.cmj test/test_order.cmi test/test_order.cmj test/test_order_tailcall.cmi test/test_order_tailcall.cmj test/test_other_exn.cmi test/test_other_exn.cmj test/test_pack.cmi test/test_pack.cmj test/test_per.cmi test/test_per.cmj test/test_pervasive.cmi test/test_pervasive.cmj test/test_pervasives2.cmi test/test_pervasives2.cmj test/test_pervasives3.cmi test/test_pervasives3.cmj test/test_primitive.cmi test/test_primitive.cmj test/test_ramification.cmi test/test_ramification.cmj test/test_react.cmi test/test_react.cmj test/test_react_case.cmi test/test_react_case.cmj test/test_regex.cmi test/test_regex.cmj test/test_runtime_encoding.cmi test/test_runtime_encoding.cmj test/test_scope.cmi test/test_scope.cmj test/test_seq.cmi test/test_seq.cmj test/test_set.cmi test/test_set.cmj test/test_side_effect_functor.cmi test/test_side_effect_functor.cmj test/test_simple_include.cmi test/test_simple_include.cmj test/test_simple_pattern_match.cmi test/test_simple_pattern_match.cmj test/test_simple_ref.cmi test/test_simple_ref.cmj test/test_simple_tailcall.cmi test/test_simple_tailcall.cmj test/test_small.cmi test/test_small.cmj test/test_sprintf.cmi test/test_sprintf.cmj test/test_stack.cmi test/test_stack.cmj test/test_static_catch_ident.cmi test/test_static_catch_ident.cmj test/test_string.cmi test/test_string.cmj test/test_string_case.cmi test/test_string_case.cmj test/test_string_const.cmi test/test_string_const.cmj test/test_string_map.cmi test/test_string_map.cmj test/test_string_switch.cmi test/test_string_switch.cmj test/test_switch.cmi test/test_switch.cmj test/test_trywith.cmi test/test_trywith.cmj test/test_tuple.cmi test/test_tuple.cmj test/test_tuple_destructring.cmi test/test_tuple_destructring.cmj test/test_type_based_arity.cmi test/test_type_based_arity.cmj test/test_u.cmi test/test_u.cmj test/test_unknown.cmi test/test_unknown.cmj test/test_unsafe_cmp.cmi test/test_unsafe_cmp.cmj test/test_unsafe_obj_ffi.cmi test/test_unsafe_obj_ffi.cmj test/test_unsafe_obj_ffi_ppx.cmi test/test_unsafe_obj_ffi_ppx.cmj test/test_unsupported_primitive.cmi test/test_unsupported_primitive.cmj test/test_while_closure.cmi test/test_while_closure.cmj test/test_while_side_effect.cmi test/test_while_side_effect.cmj test/test_zero_nullable.cmi test/test_zero_nullable.cmj test/then_mangle_test.cmi test/then_mangle_test.cmj test/ticker.cmi test/ticker.cmj test/to_string_test.cmi test/to_string_test.cmj test/topsort_test.cmi test/topsort_test.cmj test/tramp_fib.cmi test/tramp_fib.cmj test/tuple_alloc.cmi test/tuple_alloc.cmj test/type-coercion-free-vars.cmi test/type-coercion-free-vars.cmj test/type_disambiguate.cmi test/type_disambiguate.cmj test/typeof_test.cmi test/typeof_test.cmj test/unboxed_attribute.cmi test/unboxed_attribute.cmj test/unboxed_attribute_test.cmi test/unboxed_attribute_test.cmj test/unboxed_crash.cmi test/unboxed_crash.cmj test/unboxed_use_case.cmi test/unboxed_use_case.cmj test/uncurried_cast.cmi test/uncurried_cast.cmj test/uncurried_default.args.cmi test/uncurried_default.args.cmj test/uncurried_pipe.cmi test/uncurried_pipe.cmj test/uncurry_external_test.cmi test/uncurry_external_test.cmj test/uncurry_glob_test.cmi test/uncurry_glob_test.cmj test/uncurry_test.cmi test/uncurry_test.cmj test/undef_regression2_test.cmi test/undef_regression2_test.cmj test/undef_regression_test.cmi test/undef_regression_test.cmj test/undefine_conditional.cmi test/undefine_conditional.cmj test/unicode_type_error.cmi test/unicode_type_error.cmj test/unit_undefined_test.cmi test/unit_undefined_test.cmj test/unitest_string.cmi test/unitest_string.cmj test/unsafe_full_apply_primitive.cmi test/unsafe_full_apply_primitive.cmj test/unsafe_ppx_test.cmi test/unsafe_ppx_test.cmj test/update_record_test.cmi test/update_record_test.cmj test/variant.cmi test/variant.cmj test/variantsMatching.cmi test/variantsMatching.cmj test/webpack_config.cmi test/webpack_config.cmj diff --git a/jscomp/test/js_array_test.js b/jscomp/test/js_array_test.js index 5c3db77382..926b544782 100644 --- a/jscomp/test/js_array_test.js +++ b/jscomp/test/js_array_test.js @@ -2,101 +2,103 @@ 'use strict'; let Mt = require("./mt.js"); -let Js_vector = require("../../lib/js/js_vector.js"); let Caml_option = require("../../lib/js/caml_option.js"); let suites_0 = [ - "File \"js_array_test.res\", line 5, characters 6-13", + "isArray_array", (function (param) { - let x = [ - 1, - 2, - 3, - 4, - 5 - ]; return { TAG: "Eq", - _0: [ - 2, - 4 - ], - _1: (Js_vector.filterInPlace((function (x) { - return x % 2 === 0; - }), x), x) + _0: true, + _1: Array.isArray([]) }; }) ]; let suites_1 = { hd: [ - "File \"js_array_test.res\", line 16, characters 6-13", + "isArray_int", (function (param) { - let x = [ - 1, - 2, - 3, - 4, - 5 - ]; return { TAG: "Eq", - _0: true, - _1: (Js_vector.filterInPlace((function (x) { - return x > 10; - }), x), x.length === 0) + _0: false, + _1: Array.isArray(34) }; }) ], tl: { hd: [ - "isArray_array", + "length", (function (param) { return { TAG: "Eq", - _0: true, - _1: Array.isArray([]) + _0: 3, + _1: [ + 1, + 2, + 3 + ].length }; }) ], tl: { hd: [ - "isArray_int", + "copyWithin", (function (param) { return { TAG: "Eq", - _0: false, - _1: Array.isArray(34) + _0: [ + 1, + 2, + 3, + 1, + 2 + ], + _1: [ + 1, + 2, + 3, + 4, + 5 + ].copyWithin(-2) }; }) ], tl: { hd: [ - "length", + "copyWithinFrom", (function (param) { return { TAG: "Eq", - _0: 3, + _0: [ + 4, + 5, + 3, + 4, + 5 + ], _1: [ 1, 2, - 3 - ].length + 3, + 4, + 5 + ].copyWithin(0, 3) }; }) ], tl: { hd: [ - "copyWithin", + "copyWithinFromRange", (function (param) { return { TAG: "Eq", _0: [ - 1, + 4, 2, 3, - 1, - 2 + 4, + 5 ], _1: [ 1, @@ -104,257 +106,271 @@ let suites_1 = { 3, 4, 5 - ].copyWithin(-2) + ].copyWithin(0, 3, 4) }; }) ], tl: { hd: [ - "copyWithinFrom", + "fillInPlace", (function (param) { return { TAG: "Eq", _0: [ 4, - 5, - 3, 4, - 5 + 4 ], _1: [ 1, 2, - 3, - 4, - 5 - ].copyWithin(0, 3) + 3 + ].fill(4) }; }) ], tl: { hd: [ - "copyWithinFromRange", + "fillFromInPlace", (function (param) { return { TAG: "Eq", _0: [ + 1, 4, - 2, - 3, - 4, - 5 + 4 ], _1: [ 1, 2, - 3, - 4, - 5 - ].copyWithin(0, 3, 4) + 3 + ].fill(4, 1) }; }) ], tl: { hd: [ - "fillInPlace", + "fillRangeInPlace", (function (param) { return { TAG: "Eq", _0: [ + 1, 4, - 4, - 4 + 3 ], _1: [ 1, 2, 3 - ].fill(4) + ].fill(4, 1, 2) }; }) ], tl: { hd: [ - "fillFromInPlace", + "pop", (function (param) { return { TAG: "Eq", - _0: [ - 1, - 4, - 4 - ], - _1: [ + _0: 3, + _1: Caml_option.undefined_to_opt([ 1, 2, 3 - ].fill(4, 1) + ].pop()) }; }) ], tl: { hd: [ - "fillRangeInPlace", + "pop - empty array", (function (param) { return { TAG: "Eq", - _0: [ - 1, - 4, - 3 - ], - _1: [ - 1, - 2, - 3 - ].fill(4, 1, 2) + _0: undefined, + _1: Caml_option.undefined_to_opt([].pop()) }; }) ], tl: { hd: [ - "pop", + "push", (function (param) { return { TAG: "Eq", - _0: 3, - _1: Caml_option.undefined_to_opt([ + _0: 4, + _1: [ 1, 2, 3 - ].pop()) + ].push(4) }; }) ], tl: { hd: [ - "pop - empty array", + "pushMany", (function (param) { return { TAG: "Eq", - _0: undefined, - _1: Caml_option.undefined_to_opt([].pop()) + _0: 5, + _1: [ + 1, + 2, + 3 + ].push(4, 5) }; }) ], tl: { hd: [ - "push", + "reverseInPlace", (function (param) { return { TAG: "Eq", - _0: 4, + _0: [ + 3, + 2, + 1 + ], _1: [ 1, 2, 3 - ].push(4) + ].reverse() }; }) ], tl: { hd: [ - "pushMany", + "shift", (function (param) { return { TAG: "Eq", - _0: 5, - _1: [ + _0: 1, + _1: Caml_option.undefined_to_opt([ 1, 2, 3 - ].push(4, 5) + ].shift()) }; }) ], tl: { hd: [ - "reverseInPlace", + "shift - empty array", (function (param) { return { TAG: "Eq", - _0: [ - 3, - 2, - 1 - ], - _1: [ - 1, - 2, - 3 - ].reverse() + _0: undefined, + _1: Caml_option.undefined_to_opt([].shift()) }; }) ], tl: { hd: [ - "shift", + "sortInPlace", (function (param) { return { TAG: "Eq", - _0: 1, - _1: Caml_option.undefined_to_opt([ + _0: [ 1, 2, 3 - ].shift()) + ], + _1: [ + 3, + 1, + 2 + ].sort() }; }) ], tl: { hd: [ - "shift - empty array", + "sortInPlaceWith", (function (param) { return { TAG: "Eq", - _0: undefined, - _1: Caml_option.undefined_to_opt([].shift()) + _0: [ + 3, + 2, + 1 + ], + _1: [ + 3, + 1, + 2 + ].sort(function (a, b) { + return b - a | 0; + }) }; }) ], tl: { hd: [ - "sortInPlace", + "spliceInPlace", (function (param) { + let arr = [ + 1, + 2, + 3, + 4 + ]; + let removed = arr.splice(2, 0, 5); return { TAG: "Eq", _0: [ - 1, - 2, - 3 + [ + 1, + 2, + 5, + 3, + 4 + ], + [] ], _1: [ - 3, - 1, - 2 - ].sort() + arr, + removed + ] }; }) ], tl: { hd: [ - "sortInPlaceWith", + "removeFromInPlace", (function (param) { + let arr = [ + 1, + 2, + 3, + 4 + ]; + let removed = arr.splice(2); return { TAG: "Eq", _0: [ - 3, - 2, - 1 + [ + 1, + 2 + ], + [ + 3, + 4 + ] ], _1: [ - 3, - 1, - 2 - ].sort(function (a, b) { - return b - a | 0; - }) + arr, + removed + ] }; }) ], tl: { hd: [ - "spliceInPlace", + "removeCountInPlace", (function (param) { let arr = [ 1, @@ -362,18 +378,16 @@ let suites_1 = { 3, 4 ]; - let removed = arr.splice(2, 0, 5); + let removed = arr.splice(2, 1); return { TAG: "Eq", _0: [ [ 1, 2, - 5, - 3, 4 ], - [] + [3] ], _1: [ arr, @@ -384,95 +398,81 @@ let suites_1 = { ], tl: { hd: [ - "removeFromInPlace", + "unshift", (function (param) { - let arr = [ - 1, - 2, - 3, - 4 - ]; - let removed = arr.splice(2); return { TAG: "Eq", - _0: [ - [ - 1, - 2 - ], - [ - 3, - 4 - ] - ], + _0: 4, _1: [ - arr, - removed - ] + 1, + 2, + 3 + ].unshift(4) }; }) ], tl: { hd: [ - "removeCountInPlace", + "unshiftMany", (function (param) { - let arr = [ - 1, - 2, - 3, - 4 - ]; - let removed = arr.splice(2, 1); return { TAG: "Eq", - _0: [ - [ - 1, - 2, - 4 - ], - [3] - ], + _0: 5, _1: [ - arr, - removed - ] + 1, + 2, + 3 + ].unshift(4, 5) }; }) ], tl: { hd: [ - "unshift", + "append", (function (param) { return { TAG: "Eq", - _0: 4, + _0: [ + 1, + 2, + 3, + 4 + ], _1: [ 1, 2, 3 - ].unshift(4) + ].concat([4]) }; }) ], tl: { hd: [ - "unshiftMany", + "concat", (function (param) { return { TAG: "Eq", - _0: 5, + _0: [ + 1, + 2, + 3, + 4, + 5 + ], _1: [ 1, 2, 3 - ].unshift(4, 5) + ].concat([ + 4, + 5 + ]) }; }) ], tl: { hd: [ - "append", + "concatMany", (function (param) { return { TAG: "Eq", @@ -480,185 +480,185 @@ let suites_1 = { 1, 2, 3, - 4 + 4, + 5, + 6, + 7 ], _1: [ 1, 2, 3 - ].concat([4]) + ].concat([ + 4, + 5 + ], [ + 6, + 7 + ]) }; }) ], tl: { hd: [ - "concat", + "includes", (function (param) { return { TAG: "Eq", - _0: [ - 1, - 2, - 3, - 4, - 5 - ], + _0: true, _1: [ 1, 2, 3 - ].concat([ - 4, - 5 - ]) + ].includes(3) }; }) ], tl: { hd: [ - "concatMany", + "indexOf", (function (param) { return { TAG: "Eq", - _0: [ - 1, - 2, - 3, - 4, - 5, - 6, - 7 - ], + _0: 1, _1: [ 1, 2, 3 - ].concat([ - 4, - 5 - ], [ - 6, - 7 - ]) + ].indexOf(2) }; }) ], tl: { hd: [ - "includes", + "indexOfFrom", (function (param) { return { TAG: "Eq", - _0: true, + _0: 3, _1: [ 1, 2, - 3 - ].includes(3) + 3, + 2 + ].indexOf(2, 2) }; }) ], tl: { hd: [ - "indexOf", + "join", (function (param) { return { TAG: "Eq", - _0: 1, + _0: "1,2,3", _1: [ 1, 2, 3 - ].indexOf(2) + ].join() }; }) ], tl: { hd: [ - "indexOfFrom", + "joinWith", (function (param) { return { TAG: "Eq", - _0: 3, + _0: "1;2;3", _1: [ 1, 2, - 3, - 2 - ].indexOf(2, 2) + 3 + ].join(";") }; }) ], tl: { hd: [ - "join", + "lastIndexOf", (function (param) { return { TAG: "Eq", - _0: "1,2,3", + _0: 1, _1: [ 1, 2, 3 - ].join() + ].lastIndexOf(2) }; }) ], tl: { hd: [ - "joinWith", + "lastIndexOfFrom", (function (param) { return { TAG: "Eq", - _0: "1;2;3", + _0: 1, _1: [ 1, 2, - 3 - ].join(";") + 3, + 2 + ].lastIndexOf(2, 2) }; }) ], tl: { hd: [ - "lastIndexOf", + "slice", (function (param) { return { TAG: "Eq", - _0: 1, + _0: [ + 2, + 3 + ], _1: [ 1, 2, - 3 - ].lastIndexOf(2) + 3, + 4, + 5 + ].slice(1, 3) }; }) ], tl: { hd: [ - "lastIndexOfFrom", + "copy", (function (param) { return { TAG: "Eq", - _0: 1, + _0: [ + 1, + 2, + 3, + 4, + 5 + ], _1: [ 1, 2, 3, - 2 - ].lastIndexOf(2, 2) + 4, + 5 + ].slice() }; }) ], tl: { hd: [ - "slice", + "sliceFrom", (function (param) { return { TAG: "Eq", _0: [ - 2, - 3 + 3, + 4, + 5 ], _1: [ 1, @@ -666,181 +666,173 @@ let suites_1 = { 3, 4, 5 - ].slice(1, 3) + ].slice(2) }; }) ], tl: { hd: [ - "copy", + "toString", (function (param) { return { TAG: "Eq", - _0: [ - 1, - 2, - 3, - 4, - 5 - ], + _0: "1,2,3", _1: [ 1, 2, - 3, - 4, - 5 - ].slice() + 3 + ].toString() }; }) ], tl: { hd: [ - "sliceFrom", + "toLocaleString", (function (param) { return { TAG: "Eq", - _0: [ - 3, - 4, - 5 - ], + _0: "1,2,3", _1: [ 1, 2, - 3, - 4, - 5 - ].slice(2) + 3 + ].toLocaleString() }; }) ], tl: { hd: [ - "toString", + "every", (function (param) { return { TAG: "Eq", - _0: "1,2,3", + _0: true, _1: [ 1, 2, 3 - ].toString() + ].every(function (n) { + return n > 0; + }) }; }) ], tl: { hd: [ - "toLocaleString", + "everyi", (function (param) { return { TAG: "Eq", - _0: "1,2,3", + _0: false, _1: [ 1, 2, 3 - ].toLocaleString() + ].every(function (param, i) { + return i > 0; + }) }; }) ], tl: { hd: [ - "every", + "filter", (function (param) { return { TAG: "Eq", - _0: true, + _0: [ + 2, + 4 + ], _1: [ 1, 2, - 3 - ].every(function (n) { - return n > 0; + 3, + 4 + ].filter(function (n) { + return n % 2 === 0; }) }; }) ], tl: { hd: [ - "everyi", + "filteri", (function (param) { return { TAG: "Eq", - _0: false, + _0: [ + 1, + 3 + ], _1: [ 1, 2, - 3 - ].every(function (param, i) { - return i > 0; + 3, + 4 + ].filter(function (param, i) { + return i % 2 === 0; }) }; }) ], tl: { hd: [ - "filter", + "find", (function (param) { return { TAG: "Eq", - _0: [ - 2, - 4 - ], - _1: [ + _0: 2, + _1: Caml_option.undefined_to_opt([ 1, 2, 3, 4 - ].filter(function (n) { + ].find(function (n) { return n % 2 === 0; - }) + })) }; }) ], tl: { hd: [ - "filteri", + "find - no match", (function (param) { return { TAG: "Eq", - _0: [ - 1, - 3 - ], - _1: [ + _0: undefined, + _1: Caml_option.undefined_to_opt([ 1, 2, 3, 4 - ].filter(function (param, i) { - return i % 2 === 0; - }) + ].find(function (n) { + return n % 2 === 5; + })) }; }) ], tl: { hd: [ - "find", + "findi", (function (param) { return { TAG: "Eq", - _0: 2, + _0: 1, _1: Caml_option.undefined_to_opt([ 1, 2, 3, 4 - ].find(function (n) { - return n % 2 === 0; + ].find(function (param, i) { + return i % 2 === 0; })) }; }) ], tl: { hd: [ - "find - no match", + "findi - no match", (function (param) { return { TAG: "Eq", @@ -850,175 +842,175 @@ let suites_1 = { 2, 3, 4 - ].find(function (n) { - return n % 2 === 5; + ].find(function (param, i) { + return i % 2 === 5; })) }; }) ], tl: { hd: [ - "findi", + "findIndex", (function (param) { return { TAG: "Eq", _0: 1, - _1: Caml_option.undefined_to_opt([ + _1: [ 1, 2, 3, 4 - ].find(function (param, i) { - return i % 2 === 0; - })) + ].findIndex(function (n) { + return n % 2 === 0; + }) }; }) ], tl: { hd: [ - "findi - no match", + "findIndexi", (function (param) { return { TAG: "Eq", - _0: undefined, - _1: Caml_option.undefined_to_opt([ + _0: 0, + _1: [ 1, 2, 3, 4 - ].find(function (param, i) { - return i % 2 === 5; - })) + ].findIndex(function (param, i) { + return i % 2 === 0; + }) }; }) ], tl: { hd: [ - "findIndex", + "forEach", (function (param) { + let sum = { + contents: 0 + }; + [ + 1, + 2, + 3 + ].forEach(function (n) { + sum.contents = sum.contents + n | 0; + }); return { TAG: "Eq", - _0: 1, - _1: [ - 1, - 2, - 3, - 4 - ].findIndex(function (n) { - return n % 2 === 0; - }) + _0: 6, + _1: sum.contents }; }) ], tl: { hd: [ - "findIndexi", + "forEachi", (function (param) { + let sum = { + contents: 0 + }; + [ + 1, + 2, + 3 + ].forEach(function (param, i) { + sum.contents = sum.contents + i | 0; + }); return { TAG: "Eq", - _0: 0, - _1: [ - 1, - 2, - 3, - 4 - ].findIndex(function (param, i) { - return i % 2 === 0; - }) + _0: 3, + _1: sum.contents }; }) ], tl: { hd: [ - "forEach", + "map", (function (param) { - let sum = { - contents: 0 - }; - [ - 1, - 2, - 3 - ].forEach(function (n) { - sum.contents = sum.contents + n | 0; - }); return { TAG: "Eq", - _0: 6, - _1: sum.contents + _0: [ + 2, + 4, + 6, + 8 + ], + _1: [ + 1, + 2, + 3, + 4 + ].map(function (n) { + return (n << 1); + }) }; }) ], tl: { hd: [ - "forEachi", + "map", (function (param) { - let sum = { - contents: 0 - }; - [ - 1, - 2, - 3 - ].forEach(function (param, i) { - sum.contents = sum.contents + i | 0; - }); return { TAG: "Eq", - _0: 3, - _1: sum.contents + _0: [ + 0, + 2, + 4, + 6 + ], + _1: [ + 1, + 2, + 3, + 4 + ].map(function (param, i) { + return (i << 1); + }) }; }) ], tl: { hd: [ - "map", + "reduce", (function (param) { return { TAG: "Eq", - _0: [ - 2, - 4, - 6, - 8 - ], + _0: -10, _1: [ 1, 2, 3, 4 - ].map(function (n) { - return (n << 1); - }) + ].reduce((function (acc, n) { + return acc - n | 0; + }), 0) }; }) ], tl: { hd: [ - "map", + "reducei", (function (param) { return { TAG: "Eq", - _0: [ - 0, - 2, - 4, - 6 - ], + _0: -6, _1: [ 1, 2, 3, 4 - ].map(function (param, i) { - return (i << 1); - }) + ].reduce((function (acc, param, i) { + return acc - i | 0; + }), 0) }; }) ], tl: { hd: [ - "reduce", + "reduceRight", (function (param) { return { TAG: "Eq", @@ -1028,7 +1020,7 @@ let suites_1 = { 2, 3, 4 - ].reduce((function (acc, n) { + ].reduceRight((function (acc, n) { return acc - n | 0; }), 0) }; @@ -1036,7 +1028,7 @@ let suites_1 = { ], tl: { hd: [ - "reducei", + "reduceRighti", (function (param) { return { TAG: "Eq", @@ -1046,7 +1038,7 @@ let suites_1 = { 2, 3, 4 - ].reduce((function (acc, param, i) { + ].reduceRight((function (acc, param, i) { return acc - i | 0; }), 0) }; @@ -1054,79 +1046,41 @@ let suites_1 = { ], tl: { hd: [ - "reduceRight", + "some", (function (param) { return { TAG: "Eq", - _0: -10, + _0: false, _1: [ 1, 2, 3, 4 - ].reduceRight((function (acc, n) { - return acc - n | 0; - }), 0) + ].some(function (n) { + return n <= 0; + }) }; }) ], tl: { hd: [ - "reduceRighti", + "somei", (function (param) { return { TAG: "Eq", - _0: -6, + _0: true, _1: [ 1, 2, 3, 4 - ].reduceRight((function (acc, param, i) { - return acc - i | 0; - }), 0) + ].some(function (param, i) { + return i <= 0; + }) }; }) ], - tl: { - hd: [ - "some", - (function (param) { - return { - TAG: "Eq", - _0: false, - _1: [ - 1, - 2, - 3, - 4 - ].some(function (n) { - return n <= 0; - }) - }; - }) - ], - tl: { - hd: [ - "somei", - (function (param) { - return { - TAG: "Eq", - _0: true, - _1: [ - 1, - 2, - 3, - 4 - ].some(function (param, i) { - return i <= 0; - }) - }; - }) - ], - tl: /* [] */0 - } - } + tl: /* [] */0 } } } diff --git a/jscomp/test/js_array_test.res b/jscomp/test/js_array_test.res index 5cf60b1b98..9a03f7aa5f 100644 --- a/jscomp/test/js_array_test.res +++ b/jscomp/test/js_array_test.res @@ -1,28 +1,6 @@ let suites = { open Mt list{ - ( - __LOC__, - _ => Eq( - [2, 4], - { - let x = [1, 2, 3, 4, 5] - Js.Vector.filterInPlace((. x) => mod(x, 2) == 0, x) - x - }, - ), - ), - ( - __LOC__, - _ => Eq( - true, - { - let x = [1, 2, 3, 4, 5] - Js.Vector.filterInPlace((. x) => x > 10, x) - Array.length(x) == 0 - }, - ), - ), /* es2015, unable to test because nothing currently implements array_like "from", (fun _ -> Eq( diff --git a/jscomp/test/js_list_test.js b/jscomp/test/js_list_test.js deleted file mode 100644 index 6409eb647f..0000000000 --- a/jscomp/test/js_list_test.js +++ /dev/null @@ -1,211 +0,0 @@ -// Generated by ReScript, PLEASE EDIT WITH CARE -'use strict'; - -let Mt = require("./mt.js"); -let Js_list = require("../../lib/js/js_list.js"); - -let suites = { - contents: /* [] */0 -}; - -let test_id = { - contents: 0 -}; - -function eq(loc, x, y) { - test_id.contents = test_id.contents + 1 | 0; - suites.contents = { - hd: [ - loc + (" id " + String(test_id.contents)), - (function () { - return { - TAG: "Eq", - _0: x, - _1: y - }; - }) - ], - tl: suites.contents - }; -} - -eq("File \"js_list_test.res\", line 11, characters 4-11", Js_list.flatten({ - hd: { - hd: 1, - tl: { - hd: 2, - tl: /* [] */0 - } - }, - tl: { - hd: { - hd: 3, - tl: /* [] */0 - }, - tl: { - hd: /* [] */0, - tl: { - hd: { - hd: 1, - tl: { - hd: 2, - tl: { - hd: 3, - tl: /* [] */0 - } - } - }, - tl: /* [] */0 - } - } - } -}), { - hd: 1, - tl: { - hd: 2, - tl: { - hd: 3, - tl: { - hd: 1, - tl: { - hd: 2, - tl: { - hd: 3, - tl: /* [] */0 - } - } - } - } - } -}); - -eq("File \"js_list_test.res\", line 15, characters 5-12", Js_list.filterMap((function (x) { - if (x % 2 === 0) { - return x; - } - -}), { - hd: 1, - tl: { - hd: 2, - tl: { - hd: 3, - tl: { - hd: 4, - tl: { - hd: 5, - tl: { - hd: 6, - tl: { - hd: 7, - tl: /* [] */0 - } - } - } - } - } - } -}), { - hd: 2, - tl: { - hd: 4, - tl: { - hd: 6, - tl: /* [] */0 - } - } -}); - -eq("File \"js_list_test.res\", line 22, characters 5-12", Js_list.filterMap((function (x) { - if (x % 2 === 0) { - return x; - } - -}), { - hd: 1, - tl: { - hd: 2, - tl: { - hd: 3, - tl: { - hd: 4, - tl: { - hd: 5, - tl: { - hd: 6, - tl: /* [] */0 - } - } - } - } - } -}), { - hd: 2, - tl: { - hd: 4, - tl: { - hd: 6, - tl: /* [] */0 - } - } -}); - -eq("File \"js_list_test.res\", line 29, characters 5-12", Js_list.countBy((function (x) { - return x % 2 === 0; -}), { - hd: 1, - tl: { - hd: 2, - tl: { - hd: 3, - tl: { - hd: 4, - tl: { - hd: 5, - tl: { - hd: 6, - tl: /* [] */0 - } - } - } - } - } -}), 3); - -let v = Js_list.init(100000, (function (i) { - return i; -})); - -eq("File \"js_list_test.res\", line 31, characters 5-12", Js_list.countBy((function (x) { - return x % 2 === 0; -}), v), 50000); - -let vv = Js_list.foldRight((function (x, y) { - return { - hd: x, - tl: y - }; -}), v, /* [] */0); - -eq("File \"js_list_test.res\", line 33, characters 5-12", true, Js_list.equal((function (x, y) { - return x === y; -}), v, vv)); - -let vvv = Js_list.filter((function (x) { - return x % 10 === 0; -}), vv); - -eq("File \"js_list_test.res\", line 36, characters 5-12", Js_list.length(vvv), 10000); - -eq("File \"js_list_test.res\", line 37, characters 5-12", true, Js_list.equal((function (x, y) { - return x === y; -}), vvv, Js_list.init(10000, (function (x) { - return Math.imul(x, 10); -})))); - -Mt.from_pair_suites("Js_list_test", suites.contents); - -exports.suites = suites; -exports.test_id = test_id; -exports.eq = eq; -/* Not a pure module */ diff --git a/jscomp/test/js_list_test.res b/jscomp/test/js_list_test.res deleted file mode 100644 index 4a40d3341a..0000000000 --- a/jscomp/test/js_list_test.res +++ /dev/null @@ -1,40 +0,0 @@ -let suites: ref = ref(list{}) -let test_id = ref(0) -let eq = (loc, x, y) => { - incr(test_id) - suites := - list{(loc ++ (" id " ++ string_of_int(test_id.contents)), _ => Mt.Eq(x, y)), ...suites.contents} -} - -let () = { - eq( - __LOC__, - Js.List.flatten(list{list{1, 2}, list{3}, list{}, list{1, 2, 3}}), - list{1, 2, 3, 1, 2, 3}, - ) - eq(__LOC__, Js.List.filterMap((. x) => - if mod(x, 2) == 0 { - Some(x) - } else { - None - } - , list{1, 2, 3, 4, 5, 6, 7}), list{2, 4, 6}) - eq(__LOC__, Js.List.filterMap((. x) => - if mod(x, 2) == 0 { - Some(x) - } else { - None - } - , list{1, 2, 3, 4, 5, 6}), list{2, 4, 6}) - eq(__LOC__, Js.List.countBy((. x) => mod(x, 2) == 0, list{1, 2, 3, 4, 5, 6}), 3) - let v = Js.List.init(10_0000, (. i) => i) - eq(__LOC__, Js.List.countBy((. x) => mod(x, 2) == 0, v), 50_000) - let vv = Js.List.foldRight((. x, y) => Js.List.cons(x, y), v, list{}) - eq(__LOC__, true, Js.List.equal((. x, y) => x == y, v, vv)) - - let vvv = Js.List.filter((. x) => mod(x, 10) == 0, vv) - eq(__LOC__, Js.List.length(vvv), 10000) - eq(__LOC__, true, Js.List.equal((. x, y) => x == y, vvv, Js.List.init(10_000, (. x) => x * 10))) -} - -Mt.from_pair_suites(__MODULE__, suites.contents) diff --git a/lib/es6/belt_internalBuckets.js b/lib/es6/belt_internalBuckets.js index 7842375964..43299a9adc 100644 --- a/lib/es6/belt_internalBuckets.js +++ b/lib/es6/belt_internalBuckets.js @@ -3,6 +3,19 @@ import * as Belt_Array from "./belt_Array.js"; import * as Caml_option from "./caml_option.js"; +function copyBucket(c) { + if (c === undefined) { + return c; + } + let head = { + key: c.key, + value: c.value, + next: undefined + }; + copyAuxCont(c.next, head); + return head; +} + function copyAuxCont(_c, _prec) { while(true) { let prec = _prec; @@ -22,19 +35,6 @@ function copyAuxCont(_c, _prec) { }; } -function copyBucket(c) { - if (c === undefined) { - return c; - } - let head = { - key: c.key, - value: c.value, - next: undefined - }; - copyAuxCont(c.next, head); - return head; -} - function copyBuckets(buckets) { let len = buckets.length; let newBuckets = new Array(len); diff --git a/lib/es6/js.js b/lib/es6/js.js index f973eb67db..bc89eac524 100644 --- a/lib/es6/js.js +++ b/lib/es6/js.js @@ -59,10 +59,6 @@ let Option; let Result; -let List; - -let Vector; - let Console; let $$Set; @@ -103,8 +99,6 @@ export { Blob, Option, Result, - List, - Vector, Console, $$Set, $$WeakSet, diff --git a/lib/es6/js_list.js b/lib/es6/js_list.js deleted file mode 100644 index 90bc952cfc..0000000000 --- a/lib/es6/js_list.js +++ /dev/null @@ -1,333 +0,0 @@ - - -import * as Js_vector from "./js_vector.js"; -import * as Caml_option from "./caml_option.js"; - -function length(l) { - let _len = 0; - let _x = l; - while(true) { - let x = _x; - let len = _len; - if (!x) { - return len; - } - _x = x.tl; - _len = len + 1 | 0; - continue; - }; -} - -function cons(x, xs) { - return { - hd: x, - tl: xs - }; -} - -function isEmpty(x) { - return x === /* [] */0; -} - -function hd(x) { - if (x) { - return Caml_option.some(x.hd); - } - -} - -function tl(x) { - if (x) { - return x.tl; - } - -} - -function nth(l, n) { - if (n < 0) { - return; - } - let _l = l; - let _n = n; - while(true) { - let n$1 = _n; - let l$1 = _l; - if (!l$1) { - return; - } - if (n$1 === 0) { - return Caml_option.some(l$1.hd); - } - _n = n$1 - 1 | 0; - _l = l$1.tl; - continue; - }; -} - -function revAppend(_l1, _l2) { - while(true) { - let l2 = _l2; - let l1 = _l1; - if (!l1) { - return l2; - } - _l2 = { - hd: l1.hd, - tl: l2 - }; - _l1 = l1.tl; - continue; - }; -} - -function rev(l) { - return revAppend(l, /* [] */0); -} - -function mapRevAux(f, _acc, _ls) { - while(true) { - let ls = _ls; - let acc = _acc; - if (!ls) { - return acc; - } - _ls = ls.tl; - _acc = { - hd: f(ls.hd), - tl: acc - }; - continue; - }; -} - -function mapRev(f, ls) { - return mapRevAux(f, /* [] */0, ls); -} - -function map(f, ls) { - return revAppend(mapRevAux(f, /* [] */0, ls), /* [] */0); -} - -function iter(f, _x) { - while(true) { - let x = _x; - if (!x) { - return; - } - f(x.hd); - _x = x.tl; - continue; - }; -} - -function iteri(f, l) { - let _i = 0; - let _x = l; - while(true) { - let x = _x; - let i = _i; - if (!x) { - return; - } - f(i, x.hd); - _x = x.tl; - _i = i + 1 | 0; - continue; - }; -} - -function foldLeft(f, _accu, _l) { - while(true) { - let l = _l; - let accu = _accu; - if (!l) { - return accu; - } - _l = l.tl; - _accu = f(accu, l.hd); - continue; - }; -} - -function tailLoop(f, _acc, _x) { - while(true) { - let x = _x; - let acc = _acc; - if (!x) { - return acc; - } - _x = x.tl; - _acc = f(x.hd, acc); - continue; - }; -} - -function foldRight(f, l, init) { - let loop = function (n, x) { - if (!x) { - return init; - } - let t = x.tl; - let h = x.hd; - if (n < 1000) { - return f(h, loop(n + 1 | 0, t)); - } else { - return f(h, tailLoop(f, init, revAppend(t, /* [] */0))); - } - }; - return loop(0, l); -} - -function flatten(lx) { - let _acc = /* [] */0; - let _lx = lx; - while(true) { - let lx$1 = _lx; - let acc = _acc; - if (!lx$1) { - return revAppend(acc, /* [] */0); - } - _lx = lx$1.tl; - _acc = revAppend(lx$1.hd, acc); - continue; - }; -} - -function filterRevAux(f, _acc, _xs) { - while(true) { - let xs = _xs; - let acc = _acc; - if (!xs) { - return acc; - } - let ys = xs.tl; - let y = xs.hd; - if (f(y)) { - _xs = ys; - _acc = { - hd: y, - tl: acc - }; - continue; - } - _xs = ys; - continue; - }; -} - -function filter(f, xs) { - return revAppend(filterRevAux(f, /* [] */0, xs), /* [] */0); -} - -function filterMapRevAux(f, _acc, _xs) { - while(true) { - let xs = _xs; - let acc = _acc; - if (!xs) { - return acc; - } - let ys = xs.tl; - let z = f(xs.hd); - if (z !== undefined) { - _xs = ys; - _acc = { - hd: Caml_option.valFromOption(z), - tl: acc - }; - continue; - } - _xs = ys; - continue; - }; -} - -function filterMap(f, xs) { - return revAppend(filterMapRevAux(f, /* [] */0, xs), /* [] */0); -} - -function countBy(f, xs) { - let _acc = 0; - let _xs = xs; - while(true) { - let xs$1 = _xs; - let acc = _acc; - if (!xs$1) { - return acc; - } - _xs = xs$1.tl; - _acc = f(xs$1.hd) ? acc + 1 | 0 : acc; - continue; - }; -} - -function init(n, f) { - return Js_vector.toList(Js_vector.init(n, f)); -} - -function toVector(xs) { - if (!xs) { - return []; - } - let a = new Array(length(xs)); - let _i = 0; - let _x = xs; - while(true) { - let x = _x; - let i = _i; - if (!x) { - return a; - } - a[i] = x.hd; - _x = x.tl; - _i = i + 1 | 0; - continue; - }; -} - -function equal(cmp, _xs, _ys) { - while(true) { - let ys = _ys; - let xs = _xs; - if (!xs) { - if (ys) { - return false; - } else { - return true; - } - } - if (!ys) { - return false; - } - if (!cmp(xs.hd, ys.hd)) { - return false; - } - _ys = ys.tl; - _xs = xs.tl; - continue; - }; -} - -export { - length, - cons, - isEmpty, - hd, - tl, - nth, - revAppend, - rev, - mapRev, - map, - iter, - iteri, - foldLeft, - foldRight, - flatten, - filter, - filterMap, - countBy, - init, - toVector, - equal, -} -/* No side effect */ diff --git a/lib/es6/js_vector.js b/lib/es6/js_vector.js deleted file mode 100644 index ccbecab5a3..0000000000 --- a/lib/es6/js_vector.js +++ /dev/null @@ -1,134 +0,0 @@ - - - -function filterInPlace(p, a) { - let i = 0; - let j = 0; - while(i < a.length) { - let v = a[i]; - if (p(v)) { - a[j] = v; - j = j + 1 | 0; - } - i = i + 1 | 0; - }; - a.splice(j); -} - -function empty(a) { - a.splice(0); -} - -function pushBack(x, xs) { - xs.push(x); -} - -function memByRef(x, xs) { - return xs.indexOf(x) >= 0; -} - -function iter(f, xs) { - for(let i = 0 ,i_finish = xs.length; i < i_finish; ++i){ - f(xs[i]); - } -} - -function iteri(f, a) { - for(let i = 0 ,i_finish = a.length; i < i_finish; ++i){ - f(i, a[i]); - } -} - -function toList(a) { - let _i = a.length - 1 | 0; - let _res = /* [] */0; - while(true) { - let res = _res; - let i = _i; - if (i < 0) { - return res; - } - _res = { - hd: a[i], - tl: res - }; - _i = i - 1 | 0; - continue; - }; -} - -function init(n, f) { - let v = new Array(n); - for(let i = 0; i < n; ++i){ - v[i] = f(i); - } - return v; -} - -function copy(x) { - let len = x.length; - let b = new Array(len); - for(let i = 0; i < len; ++i){ - b[i] = x[i]; - } - return b; -} - -function map(f, a) { - let l = a.length; - let r = new Array(l); - for(let i = 0; i < l; ++i){ - r[i] = f(a[i]); - } - return r; -} - -function foldLeft(f, x, a) { - let r = x; - for(let i = 0 ,i_finish = a.length; i < i_finish; ++i){ - r = f(r, a[i]); - } - return r; -} - -function foldRight(f, a, x) { - let r = x; - for(let i = a.length - 1 | 0; i >= 0; --i){ - r = f(a[i], r); - } - return r; -} - -function mapi(f, a) { - let l = a.length; - if (l === 0) { - return []; - } - let r = new Array(l); - for(let i = 0; i < l; ++i){ - r[i] = f(i, a[i]); - } - return r; -} - -function append(x, a) { - return a.concat([x]); -} - -export { - filterInPlace, - empty, - pushBack, - copy, - memByRef, - iter, - iteri, - toList, - map, - mapi, - foldLeft, - foldRight, - init, - append, -} -/* No side effect */ diff --git a/lib/js/belt_internalBuckets.js b/lib/js/belt_internalBuckets.js index bde6492a04..21423c0177 100644 --- a/lib/js/belt_internalBuckets.js +++ b/lib/js/belt_internalBuckets.js @@ -3,6 +3,19 @@ let Belt_Array = require("./belt_Array.js"); let Caml_option = require("./caml_option.js"); +function copyBucket(c) { + if (c === undefined) { + return c; + } + let head = { + key: c.key, + value: c.value, + next: undefined + }; + copyAuxCont(c.next, head); + return head; +} + function copyAuxCont(_c, _prec) { while(true) { let prec = _prec; @@ -22,19 +35,6 @@ function copyAuxCont(_c, _prec) { }; } -function copyBucket(c) { - if (c === undefined) { - return c; - } - let head = { - key: c.key, - value: c.value, - next: undefined - }; - copyAuxCont(c.next, head); - return head; -} - function copyBuckets(buckets) { let len = buckets.length; let newBuckets = new Array(len); diff --git a/lib/js/js.js b/lib/js/js.js index b82645f58d..78030e36c4 100644 --- a/lib/js/js.js +++ b/lib/js/js.js @@ -59,10 +59,6 @@ let Option; let Result; -let List; - -let Vector; - let Console; let $$Set; @@ -102,8 +98,6 @@ exports.File = File; exports.Blob = Blob; exports.Option = Option; exports.Result = Result; -exports.List = List; -exports.Vector = Vector; exports.Console = Console; exports.$$Set = $$Set; exports.$$WeakSet = $$WeakSet; diff --git a/lib/js/js_list.js b/lib/js/js_list.js deleted file mode 100644 index ff86976b4b..0000000000 --- a/lib/js/js_list.js +++ /dev/null @@ -1,331 +0,0 @@ -'use strict'; - -let Js_vector = require("./js_vector.js"); -let Caml_option = require("./caml_option.js"); - -function length(l) { - let _len = 0; - let _x = l; - while(true) { - let x = _x; - let len = _len; - if (!x) { - return len; - } - _x = x.tl; - _len = len + 1 | 0; - continue; - }; -} - -function cons(x, xs) { - return { - hd: x, - tl: xs - }; -} - -function isEmpty(x) { - return x === /* [] */0; -} - -function hd(x) { - if (x) { - return Caml_option.some(x.hd); - } - -} - -function tl(x) { - if (x) { - return x.tl; - } - -} - -function nth(l, n) { - if (n < 0) { - return; - } - let _l = l; - let _n = n; - while(true) { - let n$1 = _n; - let l$1 = _l; - if (!l$1) { - return; - } - if (n$1 === 0) { - return Caml_option.some(l$1.hd); - } - _n = n$1 - 1 | 0; - _l = l$1.tl; - continue; - }; -} - -function revAppend(_l1, _l2) { - while(true) { - let l2 = _l2; - let l1 = _l1; - if (!l1) { - return l2; - } - _l2 = { - hd: l1.hd, - tl: l2 - }; - _l1 = l1.tl; - continue; - }; -} - -function rev(l) { - return revAppend(l, /* [] */0); -} - -function mapRevAux(f, _acc, _ls) { - while(true) { - let ls = _ls; - let acc = _acc; - if (!ls) { - return acc; - } - _ls = ls.tl; - _acc = { - hd: f(ls.hd), - tl: acc - }; - continue; - }; -} - -function mapRev(f, ls) { - return mapRevAux(f, /* [] */0, ls); -} - -function map(f, ls) { - return revAppend(mapRevAux(f, /* [] */0, ls), /* [] */0); -} - -function iter(f, _x) { - while(true) { - let x = _x; - if (!x) { - return; - } - f(x.hd); - _x = x.tl; - continue; - }; -} - -function iteri(f, l) { - let _i = 0; - let _x = l; - while(true) { - let x = _x; - let i = _i; - if (!x) { - return; - } - f(i, x.hd); - _x = x.tl; - _i = i + 1 | 0; - continue; - }; -} - -function foldLeft(f, _accu, _l) { - while(true) { - let l = _l; - let accu = _accu; - if (!l) { - return accu; - } - _l = l.tl; - _accu = f(accu, l.hd); - continue; - }; -} - -function tailLoop(f, _acc, _x) { - while(true) { - let x = _x; - let acc = _acc; - if (!x) { - return acc; - } - _x = x.tl; - _acc = f(x.hd, acc); - continue; - }; -} - -function foldRight(f, l, init) { - let loop = function (n, x) { - if (!x) { - return init; - } - let t = x.tl; - let h = x.hd; - if (n < 1000) { - return f(h, loop(n + 1 | 0, t)); - } else { - return f(h, tailLoop(f, init, revAppend(t, /* [] */0))); - } - }; - return loop(0, l); -} - -function flatten(lx) { - let _acc = /* [] */0; - let _lx = lx; - while(true) { - let lx$1 = _lx; - let acc = _acc; - if (!lx$1) { - return revAppend(acc, /* [] */0); - } - _lx = lx$1.tl; - _acc = revAppend(lx$1.hd, acc); - continue; - }; -} - -function filterRevAux(f, _acc, _xs) { - while(true) { - let xs = _xs; - let acc = _acc; - if (!xs) { - return acc; - } - let ys = xs.tl; - let y = xs.hd; - if (f(y)) { - _xs = ys; - _acc = { - hd: y, - tl: acc - }; - continue; - } - _xs = ys; - continue; - }; -} - -function filter(f, xs) { - return revAppend(filterRevAux(f, /* [] */0, xs), /* [] */0); -} - -function filterMapRevAux(f, _acc, _xs) { - while(true) { - let xs = _xs; - let acc = _acc; - if (!xs) { - return acc; - } - let ys = xs.tl; - let z = f(xs.hd); - if (z !== undefined) { - _xs = ys; - _acc = { - hd: Caml_option.valFromOption(z), - tl: acc - }; - continue; - } - _xs = ys; - continue; - }; -} - -function filterMap(f, xs) { - return revAppend(filterMapRevAux(f, /* [] */0, xs), /* [] */0); -} - -function countBy(f, xs) { - let _acc = 0; - let _xs = xs; - while(true) { - let xs$1 = _xs; - let acc = _acc; - if (!xs$1) { - return acc; - } - _xs = xs$1.tl; - _acc = f(xs$1.hd) ? acc + 1 | 0 : acc; - continue; - }; -} - -function init(n, f) { - return Js_vector.toList(Js_vector.init(n, f)); -} - -function toVector(xs) { - if (!xs) { - return []; - } - let a = new Array(length(xs)); - let _i = 0; - let _x = xs; - while(true) { - let x = _x; - let i = _i; - if (!x) { - return a; - } - a[i] = x.hd; - _x = x.tl; - _i = i + 1 | 0; - continue; - }; -} - -function equal(cmp, _xs, _ys) { - while(true) { - let ys = _ys; - let xs = _xs; - if (!xs) { - if (ys) { - return false; - } else { - return true; - } - } - if (!ys) { - return false; - } - if (!cmp(xs.hd, ys.hd)) { - return false; - } - _ys = ys.tl; - _xs = xs.tl; - continue; - }; -} - -exports.length = length; -exports.cons = cons; -exports.isEmpty = isEmpty; -exports.hd = hd; -exports.tl = tl; -exports.nth = nth; -exports.revAppend = revAppend; -exports.rev = rev; -exports.mapRev = mapRev; -exports.map = map; -exports.iter = iter; -exports.iteri = iteri; -exports.foldLeft = foldLeft; -exports.foldRight = foldRight; -exports.flatten = flatten; -exports.filter = filter; -exports.filterMap = filterMap; -exports.countBy = countBy; -exports.init = init; -exports.toVector = toVector; -exports.equal = equal; -/* No side effect */ diff --git a/lib/js/js_vector.js b/lib/js/js_vector.js deleted file mode 100644 index bf30ae8e9d..0000000000 --- a/lib/js/js_vector.js +++ /dev/null @@ -1,132 +0,0 @@ -'use strict'; - - -function filterInPlace(p, a) { - let i = 0; - let j = 0; - while(i < a.length) { - let v = a[i]; - if (p(v)) { - a[j] = v; - j = j + 1 | 0; - } - i = i + 1 | 0; - }; - a.splice(j); -} - -function empty(a) { - a.splice(0); -} - -function pushBack(x, xs) { - xs.push(x); -} - -function memByRef(x, xs) { - return xs.indexOf(x) >= 0; -} - -function iter(f, xs) { - for(let i = 0 ,i_finish = xs.length; i < i_finish; ++i){ - f(xs[i]); - } -} - -function iteri(f, a) { - for(let i = 0 ,i_finish = a.length; i < i_finish; ++i){ - f(i, a[i]); - } -} - -function toList(a) { - let _i = a.length - 1 | 0; - let _res = /* [] */0; - while(true) { - let res = _res; - let i = _i; - if (i < 0) { - return res; - } - _res = { - hd: a[i], - tl: res - }; - _i = i - 1 | 0; - continue; - }; -} - -function init(n, f) { - let v = new Array(n); - for(let i = 0; i < n; ++i){ - v[i] = f(i); - } - return v; -} - -function copy(x) { - let len = x.length; - let b = new Array(len); - for(let i = 0; i < len; ++i){ - b[i] = x[i]; - } - return b; -} - -function map(f, a) { - let l = a.length; - let r = new Array(l); - for(let i = 0; i < l; ++i){ - r[i] = f(a[i]); - } - return r; -} - -function foldLeft(f, x, a) { - let r = x; - for(let i = 0 ,i_finish = a.length; i < i_finish; ++i){ - r = f(r, a[i]); - } - return r; -} - -function foldRight(f, a, x) { - let r = x; - for(let i = a.length - 1 | 0; i >= 0; --i){ - r = f(a[i], r); - } - return r; -} - -function mapi(f, a) { - let l = a.length; - if (l === 0) { - return []; - } - let r = new Array(l); - for(let i = 0; i < l; ++i){ - r[i] = f(i, a[i]); - } - return r; -} - -function append(x, a) { - return a.concat([x]); -} - -exports.filterInPlace = filterInPlace; -exports.empty = empty; -exports.pushBack = pushBack; -exports.copy = copy; -exports.memByRef = memByRef; -exports.iter = iter; -exports.iteri = iteri; -exports.toList = toList; -exports.map = map; -exports.mapi = mapi; -exports.foldLeft = foldLeft; -exports.foldRight = foldRight; -exports.init = init; -exports.append = append; -/* No side effect */ diff --git a/packages/artifacts.txt b/packages/artifacts.txt index cebb60acbe..a8a18fa1cd 100644 --- a/packages/artifacts.txt +++ b/packages/artifacts.txt @@ -134,7 +134,6 @@ lib/es6/js_float.js lib/es6/js_global.js lib/es6/js_int.js lib/es6/js_json.js -lib/es6/js_list.js lib/es6/js_map.js lib/es6/js_math.js lib/es6/js_null.js @@ -152,7 +151,6 @@ lib/es6/js_typed_array.js lib/es6/js_typed_array2.js lib/es6/js_types.js lib/es6/js_undefined.js -lib/es6/js_vector.js lib/es6/js_weakmap.js lib/es6/js_weakset.js lib/es6/jsx.js @@ -296,7 +294,6 @@ lib/js/js_float.js lib/js/js_global.js lib/js/js_int.js lib/js/js_json.js -lib/js/js_list.js lib/js/js_map.js lib/js/js_math.js lib/js/js_null.js @@ -314,7 +311,6 @@ lib/js/js_typed_array.js lib/js/js_typed_array2.js lib/js/js_types.js lib/js/js_undefined.js -lib/js/js_vector.js lib/js/js_weakmap.js lib/js/js_weakset.js lib/js/jsx.js @@ -779,12 +775,6 @@ lib/ocaml/js_json.cmt lib/ocaml/js_json.cmti lib/ocaml/js_json.res lib/ocaml/js_json.resi -lib/ocaml/js_list.cmi -lib/ocaml/js_list.cmj -lib/ocaml/js_list.cmt -lib/ocaml/js_list.cmti -lib/ocaml/js_list.res -lib/ocaml/js_list.resi lib/ocaml/js_map.cmi lib/ocaml/js_map.cmj lib/ocaml/js_map.cmt @@ -865,12 +855,6 @@ lib/ocaml/js_undefined.cmt lib/ocaml/js_undefined.cmti lib/ocaml/js_undefined.res lib/ocaml/js_undefined.resi -lib/ocaml/js_vector.cmi -lib/ocaml/js_vector.cmj -lib/ocaml/js_vector.cmt -lib/ocaml/js_vector.cmti -lib/ocaml/js_vector.res -lib/ocaml/js_vector.resi lib/ocaml/js_weakmap.cmi lib/ocaml/js_weakmap.cmj lib/ocaml/js_weakmap.cmt From a1d9e61d6dc61bf999ee900c5940c299551edf49 Mon Sep 17 00:00:00 2001 From: Hyeseong Kim Date: Mon, 22 Jul 2024 03:53:28 +0900 Subject: [PATCH 2/2] changelog --- CHANGELOG.md | 1 + 1 file changed, 1 insertion(+) diff --git a/CHANGELOG.md b/CHANGELOG.md index d68341090e..4d38d8f0df 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -35,6 +35,7 @@ - Remove support for compiling `.ml` files, and general cleanup. https://github.com/rescript-lang/rescript-compiler/pull/6852 - Remove `rescript convert` subcommand. https://github.com/rescript-lang/rescript-compiler/pull/6860 - Remove support for `@bs.send.pipe`. This also removes all functions in `Js_typed_array` that rely on `@bs.send.pipe`. https://github.com/rescript-lang/rescript-compiler/pull/6858 https://github.com/rescript-lang/rescript-compiler/pull/6891 +- Remove deprecated `Js.Vector` and `Js.List`. https://github.com/rescript-lang/rescript-compiler/pull/6900 #### :bug: Bug Fix