diff --git a/CHANGELOG.md b/CHANGELOG.md index bc705ef797..4c7c199062 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -29,6 +29,7 @@ - Keep track of compiler info during build. https://github.com/rescript-lang/rescript/pull/7889 - Improve option optimization for constants. https://github.com/rescript-lang/rescript/pull/7913 - Option optimization: do not create redundant local vars. https://github.com/rescript-lang/rescript/pull/7915 +- Js output: remove superfluous newline after every `if`. https://github.com/rescript-lang/rescript/pull/7920 #### :house: Internal diff --git a/compiler/core/js_dump.ml b/compiler/core/js_dump.ml index 49ace5fa6c..ea1c3d5fda 100644 --- a/compiler/core/js_dump.ml +++ b/compiler/core/js_dump.ml @@ -1365,9 +1365,7 @@ and statement_desc top cxt f (s : J.statement_desc) : cxt = P.space f; let cxt = brace_block cxt f s1 in match s2 with - | [] | [{statement_desc = Block [] | Exp {expression_desc = Var _}}] -> - P.newline f; - cxt + | [] | [{statement_desc = Block [] | Exp {expression_desc = Var _}}] -> cxt | [({statement_desc = If _} as nest)] | [{statement_desc = Block [({statement_desc = If _; _} as nest)]; _}] -> P.space f; diff --git a/packages/@rescript/runtime/lib/es6/Belt_Array.js b/packages/@rescript/runtime/lib/es6/Belt_Array.js index 9dda9f0634..8e6b8e5943 100644 --- a/packages/@rescript/runtime/lib/es6/Belt_Array.js +++ b/packages/@rescript/runtime/lib/es6/Belt_Array.js @@ -7,7 +7,6 @@ function get(arr, i) { if (i >= 0 && i < arr.length) { return Primitive_option.some(arr[i]); } - } function getOrThrow(arr, i) { @@ -328,7 +327,6 @@ function keep(a, f) { r[j] = v; j = j + 1 | 0; } - } r.length = j; return r; @@ -344,7 +342,6 @@ function keepWithIndex(a, f) { r[j] = v; j = j + 1 | 0; } - } r.length = j; return r; @@ -361,7 +358,6 @@ function keepMap(a, f) { r[j] = Primitive_option.valFromOption(v$1); j = j + 1 | 0; } - } r.length = j; return r; diff --git a/packages/@rescript/runtime/lib/es6/Belt_HashMap.js b/packages/@rescript/runtime/lib/es6/Belt_HashMap.js index 1e481f3d5b..cb907139bb 100644 --- a/packages/@rescript/runtime/lib/es6/Belt_HashMap.js +++ b/packages/@rescript/runtime/lib/es6/Belt_HashMap.js @@ -57,7 +57,6 @@ function set0(h, key, value, eq, hash) { }; h.size = h.size + 1 | 0; } - } else { h_buckets[i] = { key: key, @@ -84,11 +83,9 @@ function set0(h, key, value, eq, hash) { if (tail !== undefined) { tail.next = undefined; } - } return; } - } function set(h, key, value) { @@ -166,7 +163,6 @@ function get(h, key) { }; } } - } function has(h, key) { diff --git a/packages/@rescript/runtime/lib/es6/Belt_HashMapInt.js b/packages/@rescript/runtime/lib/es6/Belt_HashMapInt.js index eea270865b..9b0951c7bf 100644 --- a/packages/@rescript/runtime/lib/es6/Belt_HashMapInt.js +++ b/packages/@rescript/runtime/lib/es6/Belt_HashMapInt.js @@ -54,7 +54,6 @@ function set(h, key, value) { }; h.size = h.size + 1 | 0; } - } else { h_buckets[i] = { key: key, @@ -81,11 +80,9 @@ function set(h, key, value) { if (tail !== undefined) { tail.next = undefined; } - } return; } - } function remove(h, key) { @@ -118,7 +115,6 @@ function remove(h, key) { }; } } - } function get(h, key) { @@ -157,7 +153,6 @@ function get(h, key) { }; } } - } function has(h, key) { diff --git a/packages/@rescript/runtime/lib/es6/Belt_HashMapString.js b/packages/@rescript/runtime/lib/es6/Belt_HashMapString.js index 6f8a428544..04462057c1 100644 --- a/packages/@rescript/runtime/lib/es6/Belt_HashMapString.js +++ b/packages/@rescript/runtime/lib/es6/Belt_HashMapString.js @@ -54,7 +54,6 @@ function set(h, key, value) { }; h.size = h.size + 1 | 0; } - } else { h_buckets[i] = { key: key, @@ -81,11 +80,9 @@ function set(h, key, value) { if (tail !== undefined) { tail.next = undefined; } - } return; } - } function remove(h, key) { @@ -118,7 +115,6 @@ function remove(h, key) { }; } } - } function get(h, key) { @@ -157,7 +153,6 @@ function get(h, key) { }; } } - } function has(h, key) { diff --git a/packages/@rescript/runtime/lib/es6/Belt_HashSet.js b/packages/@rescript/runtime/lib/es6/Belt_HashSet.js index 8eb7900af2..a4e85707e2 100644 --- a/packages/@rescript/runtime/lib/es6/Belt_HashSet.js +++ b/packages/@rescript/runtime/lib/es6/Belt_HashSet.js @@ -111,11 +111,9 @@ function add0(h, key, hash, eq) { if (tail !== undefined) { tail.next = undefined; } - } return; } - } function add(h, key) { diff --git a/packages/@rescript/runtime/lib/es6/Belt_HashSetInt.js b/packages/@rescript/runtime/lib/es6/Belt_HashSetInt.js index 7be6585ebd..6ef41f7584 100644 --- a/packages/@rescript/runtime/lib/es6/Belt_HashSetInt.js +++ b/packages/@rescript/runtime/lib/es6/Belt_HashSetInt.js @@ -111,11 +111,9 @@ function add(h, key) { if (tail !== undefined) { tail.next = undefined; } - } return; } - } function has(h, key) { diff --git a/packages/@rescript/runtime/lib/es6/Belt_HashSetString.js b/packages/@rescript/runtime/lib/es6/Belt_HashSetString.js index e0876a5a76..3128a7a244 100644 --- a/packages/@rescript/runtime/lib/es6/Belt_HashSetString.js +++ b/packages/@rescript/runtime/lib/es6/Belt_HashSetString.js @@ -111,11 +111,9 @@ function add(h, key) { if (tail !== undefined) { tail.next = undefined; } - } return; } - } function has(h, key) { diff --git a/packages/@rescript/runtime/lib/es6/Belt_List.js b/packages/@rescript/runtime/lib/es6/Belt_List.js index 6b0bdd9f4f..b5adf69a3a 100644 --- a/packages/@rescript/runtime/lib/es6/Belt_List.js +++ b/packages/@rescript/runtime/lib/es6/Belt_List.js @@ -8,7 +8,6 @@ function head(x) { if (x !== 0) { return Primitive_option.some(x.hd); } - } function headOrThrow(x) { @@ -25,7 +24,6 @@ function tail(x) { if (x !== 0) { return x.tl; } - } function tailOrThrow(x) { @@ -445,7 +443,6 @@ function take(lst, n) { if (has) { return cell; } - } function drop(lst, n) { @@ -494,7 +491,6 @@ function splitAt(lst, n) { rest ]; } - } function concat(xs, ys) { diff --git a/packages/@rescript/runtime/lib/es6/Belt_MapDict.js b/packages/@rescript/runtime/lib/es6/Belt_MapDict.js index 96e5074d70..8e99733fb3 100644 --- a/packages/@rescript/runtime/lib/es6/Belt_MapDict.js +++ b/packages/@rescript/runtime/lib/es6/Belt_MapDict.js @@ -121,7 +121,6 @@ function remove(n, x, cmp) { if (n !== undefined) { return removeAux0(n, x, cmp); } - } function mergeMany(h, arr, cmp) { @@ -255,7 +254,6 @@ function removeMany(t, keys, cmp) { continue; }; } - } let empty; diff --git a/packages/@rescript/runtime/lib/es6/Belt_MapInt.js b/packages/@rescript/runtime/lib/es6/Belt_MapInt.js index 99352cdf78..690e65c73d 100644 --- a/packages/@rescript/runtime/lib/es6/Belt_MapInt.js +++ b/packages/@rescript/runtime/lib/es6/Belt_MapInt.js @@ -113,7 +113,6 @@ function remove(n, x) { if (n !== undefined) { return removeAux(n, x); } - } function removeMany(t, keys) { @@ -137,7 +136,6 @@ function removeMany(t, keys) { continue; }; } - } function mergeMany(h, arr) { diff --git a/packages/@rescript/runtime/lib/es6/Belt_MapString.js b/packages/@rescript/runtime/lib/es6/Belt_MapString.js index 6aba64e3b2..f56f90ba2b 100644 --- a/packages/@rescript/runtime/lib/es6/Belt_MapString.js +++ b/packages/@rescript/runtime/lib/es6/Belt_MapString.js @@ -113,7 +113,6 @@ function remove(n, x) { if (n !== undefined) { return removeAux(n, x); } - } function removeMany(t, keys) { @@ -137,7 +136,6 @@ function removeMany(t, keys) { continue; }; } - } function mergeMany(h, arr) { diff --git a/packages/@rescript/runtime/lib/es6/Belt_MutableMap.js b/packages/@rescript/runtime/lib/es6/Belt_MutableMap.js index 05d25ff4b6..5209285a2b 100644 --- a/packages/@rescript/runtime/lib/es6/Belt_MutableMap.js +++ b/packages/@rescript/runtime/lib/es6/Belt_MutableMap.js @@ -50,7 +50,6 @@ function remove(d, k) { d.data = newRoot; return; } - } function removeArrayMutateAux(_t, xs, _i, len, cmp) { @@ -82,7 +81,6 @@ function removeMany(d, xs) { d.data = newRoot; return; } - } function updateDone(t, x, f, cmp) { @@ -132,7 +130,6 @@ function update(t, x, f) { t.data = newRoot; return; } - } function make(id) { @@ -280,7 +277,6 @@ function set(m, e, v) { m.data = newRoot; return; } - } function mergeManyAux(t, xs, cmp) { @@ -299,7 +295,6 @@ function mergeMany(d, xs) { d.data = newRoot; return; } - } let Int; diff --git a/packages/@rescript/runtime/lib/es6/Belt_MutableMapInt.js b/packages/@rescript/runtime/lib/es6/Belt_MutableMapInt.js index a3aef75080..d60b920ac5 100644 --- a/packages/@rescript/runtime/lib/es6/Belt_MutableMapInt.js +++ b/packages/@rescript/runtime/lib/es6/Belt_MutableMapInt.js @@ -58,7 +58,6 @@ function set(m, k, v) { m.data = v$1; return; } - } function forEach(d, f) { @@ -161,7 +160,6 @@ function remove(d, v) { d.data = newRoot; return; } - } function updateDone(t, x, f) { @@ -211,7 +209,6 @@ function update(t, x, f) { t.data = newRoot; return; } - } function removeArrayMutateAux(_t, xs, _i, len) { @@ -243,7 +240,6 @@ function removeMany(d, xs) { d.data = newRoot; return; } - } function fromArray(xs) { diff --git a/packages/@rescript/runtime/lib/es6/Belt_MutableMapString.js b/packages/@rescript/runtime/lib/es6/Belt_MutableMapString.js index beb6c675bd..ab36e91064 100644 --- a/packages/@rescript/runtime/lib/es6/Belt_MutableMapString.js +++ b/packages/@rescript/runtime/lib/es6/Belt_MutableMapString.js @@ -58,7 +58,6 @@ function set(m, k, v) { m.data = v$1; return; } - } function forEach(d, f) { @@ -161,7 +160,6 @@ function remove(d, v) { d.data = newRoot; return; } - } function updateDone(t, x, f) { @@ -211,7 +209,6 @@ function update(t, x, f) { t.data = newRoot; return; } - } function removeArrayMutateAux(_t, xs, _i, len) { @@ -243,7 +240,6 @@ function removeMany(d, xs) { d.data = newRoot; return; } - } function fromArray(xs) { diff --git a/packages/@rescript/runtime/lib/es6/Belt_MutableQueue.js b/packages/@rescript/runtime/lib/es6/Belt_MutableQueue.js index a3a23b5aa3..2db0383898 100644 --- a/packages/@rescript/runtime/lib/es6/Belt_MutableQueue.js +++ b/packages/@rescript/runtime/lib/es6/Belt_MutableQueue.js @@ -38,7 +38,6 @@ function peek(q) { if (v !== undefined) { return Primitive_option.some(v.content); } - } function peekUndefined(q) { @@ -46,7 +45,6 @@ function peekUndefined(q) { if (v !== undefined) { return v.content; } - } function peekOrThrow(q) { diff --git a/packages/@rescript/runtime/lib/es6/Belt_MutableSet.js b/packages/@rescript/runtime/lib/es6/Belt_MutableSet.js index c69e12229a..c8959c0f46 100644 --- a/packages/@rescript/runtime/lib/es6/Belt_MutableSet.js +++ b/packages/@rescript/runtime/lib/es6/Belt_MutableSet.js @@ -49,7 +49,6 @@ function remove(d, v) { d.data = newRoot; return; } - } function removeMany0(_t, xs, _i, len, cmp) { @@ -170,7 +169,6 @@ function add(m, e) { m.data = newRoot; return; } - } function addArrayMutate(t, xs, cmp) { diff --git a/packages/@rescript/runtime/lib/es6/Belt_MutableSetInt.js b/packages/@rescript/runtime/lib/es6/Belt_MutableSetInt.js index b725898682..8eeb7c5dcf 100644 --- a/packages/@rescript/runtime/lib/es6/Belt_MutableSetInt.js +++ b/packages/@rescript/runtime/lib/es6/Belt_MutableSetInt.js @@ -49,7 +49,6 @@ function remove(d, v) { d.data = newRoot; return; } - } function removeMany0(_t, xs, _i, len) { @@ -168,7 +167,6 @@ function add(d, k) { d.data = v; return; } - } function addArrayMutate(t, xs) { diff --git a/packages/@rescript/runtime/lib/es6/Belt_MutableSetString.js b/packages/@rescript/runtime/lib/es6/Belt_MutableSetString.js index a1bd02c9e1..a2479fb36e 100644 --- a/packages/@rescript/runtime/lib/es6/Belt_MutableSetString.js +++ b/packages/@rescript/runtime/lib/es6/Belt_MutableSetString.js @@ -49,7 +49,6 @@ function remove(d, v) { d.data = newRoot; return; } - } function removeMany0(_t, xs, _i, len) { @@ -168,7 +167,6 @@ function add(d, k) { d.data = v; return; } - } function addArrayMutate(t, xs) { diff --git a/packages/@rescript/runtime/lib/es6/Belt_MutableStack.js b/packages/@rescript/runtime/lib/es6/Belt_MutableStack.js index cb7b925fb6..79c1d585eb 100644 --- a/packages/@rescript/runtime/lib/es6/Belt_MutableStack.js +++ b/packages/@rescript/runtime/lib/es6/Belt_MutableStack.js @@ -30,7 +30,6 @@ function topUndefined(s) { if (x !== undefined) { return x.head; } - } function top(s) { @@ -38,7 +37,6 @@ function top(s) { if (x !== undefined) { return Primitive_option.some(x.head); } - } function isEmpty(s) { @@ -51,7 +49,6 @@ function popUndefined(s) { s.root = x.tail; return x.head; } - } function pop(s) { @@ -60,7 +57,6 @@ function pop(s) { s.root = x.tail; return Primitive_option.some(x.head); } - } function size(s) { diff --git a/packages/@rescript/runtime/lib/es6/Belt_Option.js b/packages/@rescript/runtime/lib/es6/Belt_Option.js index a322681d26..6a36ae5363 100644 --- a/packages/@rescript/runtime/lib/es6/Belt_Option.js +++ b/packages/@rescript/runtime/lib/es6/Belt_Option.js @@ -6,14 +6,12 @@ function keep(opt, p) { if (opt !== undefined && p(Primitive_option.valFromOption(opt))) { return opt; } - } function forEach(opt, f) { if (opt !== undefined) { return f(Primitive_option.valFromOption(opt)); } - } function getOrThrow(x) { @@ -38,14 +36,12 @@ function map(opt, f) { if (opt !== undefined) { return Primitive_option.some(f(Primitive_option.valFromOption(opt))); } - } function flatMap(opt, f) { if (opt !== undefined) { return f(Primitive_option.valFromOption(opt)); } - } function getWithDefault(opt, $$default) { diff --git a/packages/@rescript/runtime/lib/es6/Belt_internalAVLset.js b/packages/@rescript/runtime/lib/es6/Belt_internalAVLset.js index a94e510cef..dcefd17a27 100644 --- a/packages/@rescript/runtime/lib/es6/Belt_internalAVLset.js +++ b/packages/@rescript/runtime/lib/es6/Belt_internalAVLset.js @@ -98,14 +98,12 @@ function minimum(n) { if (n !== undefined) { return Primitive_option.some(min0Aux(n)); } - } function minUndefined(n) { if (n !== undefined) { return min0Aux(n); } - } function max0Aux(_n) { @@ -124,14 +122,12 @@ function maximum(n) { if (n !== undefined) { return Primitive_option.some(max0Aux(n)); } - } function maxUndefined(n) { if (n !== undefined) { return max0Aux(n); } - } function removeMinAuxWithRef(n, v) { diff --git a/packages/@rescript/runtime/lib/es6/Belt_internalAVLtree.js b/packages/@rescript/runtime/lib/es6/Belt_internalAVLtree.js index 75711d4049..ae66e930e4 100644 --- a/packages/@rescript/runtime/lib/es6/Belt_internalAVLtree.js +++ b/packages/@rescript/runtime/lib/es6/Belt_internalAVLtree.js @@ -120,14 +120,12 @@ function minKey(n) { if (n !== undefined) { return Primitive_option.some(minKey0Aux(n)); } - } function minKeyUndefined(n) { if (n !== undefined) { return minKey0Aux(n); } - } function maxKey0Aux(_n) { @@ -146,14 +144,12 @@ function maxKey(n) { if (n !== undefined) { return Primitive_option.some(maxKey0Aux(n)); } - } function maxKeyUndefined(n) { if (n !== undefined) { return maxKey0Aux(n); } - } function minKV0Aux(_n) { @@ -175,14 +171,12 @@ function minimum(n) { if (n !== undefined) { return minKV0Aux(n); } - } function minUndefined(n) { if (n !== undefined) { return minKV0Aux(n); } - } function maxKV0Aux(_n) { @@ -204,14 +198,12 @@ function maximum(n) { if (n !== undefined) { return maxKV0Aux(n); } - } function maxUndefined(n) { if (n !== undefined) { return maxKV0Aux(n); } - } function removeMinAuxWithRef(n, kr, vr) { @@ -266,7 +258,6 @@ function findFirstBy(n, p) { if (right !== undefined) { return right; } - } function forEach(_n, f) { diff --git a/packages/@rescript/runtime/lib/es6/Belt_internalBuckets.js b/packages/@rescript/runtime/lib/es6/Belt_internalBuckets.js index 39d93d14d9..a2f6123086 100644 --- a/packages/@rescript/runtime/lib/es6/Belt_internalBuckets.js +++ b/packages/@rescript/runtime/lib/es6/Belt_internalBuckets.js @@ -176,7 +176,6 @@ function keepMapInPlace(h, f) { if (v !== undefined) { filterMapInplaceBucket(f, h, i, undefined, v); } - } } @@ -222,7 +221,6 @@ function linear(h, f) { if (cell !== undefined) { current = fillArrayMap(current, arr, cell, f); } - } return arr; } diff --git a/packages/@rescript/runtime/lib/es6/Belt_internalMapInt.js b/packages/@rescript/runtime/lib/es6/Belt_internalMapInt.js index b21c0df5a8..fccd8d044a 100644 --- a/packages/@rescript/runtime/lib/es6/Belt_internalMapInt.js +++ b/packages/@rescript/runtime/lib/es6/Belt_internalMapInt.js @@ -195,7 +195,6 @@ function merge(s1, s2, f) { let match = split(v1, s2); return Belt_internalAVLtree.concatOrJoin(merge(l1, match[0], f), v1, f(v1, Primitive_option.some(d1), match[1]), merge(r1, match[2], f)); } - } else if (s2 === undefined) { return; } diff --git a/packages/@rescript/runtime/lib/es6/Belt_internalMapString.js b/packages/@rescript/runtime/lib/es6/Belt_internalMapString.js index 243d0d90ef..8619fb7ae9 100644 --- a/packages/@rescript/runtime/lib/es6/Belt_internalMapString.js +++ b/packages/@rescript/runtime/lib/es6/Belt_internalMapString.js @@ -195,7 +195,6 @@ function merge(s1, s2, f) { let match = split(v1, s2); return Belt_internalAVLtree.concatOrJoin(merge(l1, match[0], f), v1, f(v1, Primitive_option.some(d1), match[1]), merge(r1, match[2], f)); } - } else if (s2 === undefined) { return; } diff --git a/packages/@rescript/runtime/lib/es6/Belt_internalSetBuckets.js b/packages/@rescript/runtime/lib/es6/Belt_internalSetBuckets.js index ca8c88e8b9..9cf3df9712 100644 --- a/packages/@rescript/runtime/lib/es6/Belt_internalSetBuckets.js +++ b/packages/@rescript/runtime/lib/es6/Belt_internalSetBuckets.js @@ -107,7 +107,6 @@ function toArray(h) { if (cell !== undefined) { current = fillArray(current, arr, cell); } - } return arr; } diff --git a/packages/@rescript/runtime/lib/es6/Js_dict.js b/packages/@rescript/runtime/lib/es6/Js_dict.js index 3e56207162..f8a87eb7c9 100644 --- a/packages/@rescript/runtime/lib/es6/Js_dict.js +++ b/packages/@rescript/runtime/lib/es6/Js_dict.js @@ -6,7 +6,6 @@ function get(dict, k) { if ((k in dict)) { return Primitive_option.some(dict[k]); } - } let unsafeDeleteKey = (function (dict,key){ diff --git a/packages/@rescript/runtime/lib/es6/Js_json.js b/packages/@rescript/runtime/lib/es6/Js_json.js index 398110bc67..8b78627746 100644 --- a/packages/@rescript/runtime/lib/es6/Js_json.js +++ b/packages/@rescript/runtime/lib/es6/Js_json.js @@ -61,42 +61,36 @@ function decodeString(json) { if (typeof json === "string") { return json; } - } function decodeNumber(json) { if (typeof json === "number") { return json; } - } function decodeObject(json) { if (typeof json === "object" && !Array.isArray(json) && json !== null) { return json; } - } function decodeArray(json) { if (Array.isArray(json)) { return json; } - } function decodeBoolean(json) { if (typeof json === "boolean") { return json; } - } function decodeNull(json) { if (json === null) { return null; } - } let patch = (function (json) { diff --git a/packages/@rescript/runtime/lib/es6/Js_null.js b/packages/@rescript/runtime/lib/es6/Js_null.js index 271d316ca4..06089ffe9c 100644 --- a/packages/@rescript/runtime/lib/es6/Js_null.js +++ b/packages/@rescript/runtime/lib/es6/Js_null.js @@ -25,7 +25,6 @@ function iter(x, f) { if (x !== null) { return f(x); } - } function fromOption(x) { diff --git a/packages/@rescript/runtime/lib/es6/Js_null_undefined.js b/packages/@rescript/runtime/lib/es6/Js_null_undefined.js index 38dfd45356..c78eb78baf 100644 --- a/packages/@rescript/runtime/lib/es6/Js_null_undefined.js +++ b/packages/@rescript/runtime/lib/es6/Js_null_undefined.js @@ -14,14 +14,12 @@ function iter(x, f) { if (!(x == null)) { return f(x); } - } function fromOption(x) { if (x !== undefined) { return Primitive_option.valFromOption(x); } - } let from_opt = fromOption; diff --git a/packages/@rescript/runtime/lib/es6/Js_option.js b/packages/@rescript/runtime/lib/es6/Js_option.js index b15fb7b81c..da62161d82 100644 --- a/packages/@rescript/runtime/lib/es6/Js_option.js +++ b/packages/@rescript/runtime/lib/es6/Js_option.js @@ -45,14 +45,12 @@ function andThen(f, x) { if (x !== undefined) { return f(Primitive_option.valFromOption(x)); } - } function map(f, x) { if (x !== undefined) { return Primitive_option.some(f(Primitive_option.valFromOption(x))); } - } function getWithDefault(a, x) { @@ -71,7 +69,6 @@ function filter(f, x) { if (f(x$1)) { return Primitive_option.some(x$1); } - } function firstSome(a, b) { diff --git a/packages/@rescript/runtime/lib/es6/Js_undefined.js b/packages/@rescript/runtime/lib/es6/Js_undefined.js index 361af66271..66e20984f4 100644 --- a/packages/@rescript/runtime/lib/es6/Js_undefined.js +++ b/packages/@rescript/runtime/lib/es6/Js_undefined.js @@ -23,7 +23,6 @@ function bind(x, f) { if (x$1 !== undefined) { return f(Primitive_option.valFromOption(x$1)); } - } function iter(x, f) { @@ -31,14 +30,12 @@ function iter(x, f) { if (x$1 !== undefined) { return f(Primitive_option.valFromOption(x$1)); } - } function fromOption(x) { if (x !== undefined) { return Primitive_option.valFromOption(x); } - } let from_opt = fromOption; diff --git a/packages/@rescript/runtime/lib/es6/Primitive_hash.js b/packages/@rescript/runtime/lib/es6/Primitive_hash.js index 5a6688256a..3c3fec58db 100644 --- a/packages/@rescript/runtime/lib/es6/Primitive_hash.js +++ b/packages/@rescript/runtime/lib/es6/Primitive_hash.js @@ -136,7 +136,6 @@ function hash(count, _limit, seed, obj) { s = hash_mix_int(s, (size$1 << 10) | 0); } } - }; return hash_final_mix(s); } diff --git a/packages/@rescript/runtime/lib/es6/Primitive_object.js b/packages/@rescript/runtime/lib/es6/Primitive_object.js index 4dc3663fdd..0c3337aed0 100644 --- a/packages/@rescript/runtime/lib/es6/Primitive_object.js +++ b/packages/@rescript/runtime/lib/es6/Primitive_object.js @@ -266,14 +266,12 @@ function equal(a, b) { result.contents = false; return; } - }; let do_key_b = key => { if (!Object.prototype.hasOwnProperty.call(a, key) || !equal(b[key], a[key])) { result.contents = false; return; } - }; for_in(a, do_key_a); if (result.contents) { diff --git a/packages/@rescript/runtime/lib/es6/Stdlib_Array.js b/packages/@rescript/runtime/lib/es6/Stdlib_Array.js index 2cf6e3066b..a037673ab6 100644 --- a/packages/@rescript/runtime/lib/es6/Stdlib_Array.js +++ b/packages/@rescript/runtime/lib/es6/Stdlib_Array.js @@ -75,7 +75,6 @@ function indexOfOpt(arr, item) { if (index !== -1) { return index; } - } function lastIndexOfOpt(arr, item) { @@ -83,7 +82,6 @@ function lastIndexOfOpt(arr, item) { if (index !== -1) { return index; } - } function reduce(arr, init, f) { @@ -107,7 +105,6 @@ function findIndexOpt(array, finder) { if (index !== -1) { return index; } - } function findLastIndexOpt(array, finder) { @@ -115,7 +112,6 @@ function findLastIndexOpt(array, finder) { if (index !== -1) { return index; } - } function swapUnsafe(xs, i, j) { @@ -152,7 +148,6 @@ function filterMap(a, f) { r[j] = Primitive_option.valFromOption(v$1); j = j + 1 | 0; } - } r.length = j; return r; @@ -173,7 +168,6 @@ function filterMapWithIndex(a, f) { r[j] = Primitive_option.valFromOption(v$1); j = j + 1 | 0; } - } r.length = j; return r; diff --git a/packages/@rescript/runtime/lib/es6/Stdlib_Error.js b/packages/@rescript/runtime/lib/es6/Stdlib_Error.js index 682b462e12..cbeb0edadb 100644 --- a/packages/@rescript/runtime/lib/es6/Stdlib_Error.js +++ b/packages/@rescript/runtime/lib/es6/Stdlib_Error.js @@ -7,7 +7,6 @@ function fromException(exn) { if (exn.RE_EXN_ID === Stdlib_Exn.$$Error) { return Primitive_option.some(exn._1); } - } let $$EvalError = {}; diff --git a/packages/@rescript/runtime/lib/es6/Stdlib_Exn.js b/packages/@rescript/runtime/lib/es6/Stdlib_Exn.js index 548a32b106..3a3e77775e 100644 --- a/packages/@rescript/runtime/lib/es6/Stdlib_Exn.js +++ b/packages/@rescript/runtime/lib/es6/Stdlib_Exn.js @@ -8,7 +8,6 @@ function asJsExn(exn) { if (exn.RE_EXN_ID === $$Error) { return Primitive_option.some(exn._1); } - } function raiseError(str) { diff --git a/packages/@rescript/runtime/lib/es6/Stdlib_JSON.js b/packages/@rescript/runtime/lib/es6/Stdlib_JSON.js index ecd1fca530..bb11e9baf4 100644 --- a/packages/@rescript/runtime/lib/es6/Stdlib_JSON.js +++ b/packages/@rescript/runtime/lib/es6/Stdlib_JSON.js @@ -44,42 +44,36 @@ function bool(json) { if (typeof json === "boolean") { return json; } - } function $$null(json) { if (json === null) { return null; } - } function string(json) { if (typeof json === "string") { return json; } - } function float(json) { if (typeof json === "number") { return json; } - } function object(json) { if (typeof json === "object" && json !== null && !Array.isArray(json)) { return json; } - } function array(json) { if (Array.isArray(json)) { return json; } - } let Decode = { diff --git a/packages/@rescript/runtime/lib/es6/Stdlib_JsExn.js b/packages/@rescript/runtime/lib/es6/Stdlib_JsExn.js index 4273b89a74..2a4f3fd132 100644 --- a/packages/@rescript/runtime/lib/es6/Stdlib_JsExn.js +++ b/packages/@rescript/runtime/lib/es6/Stdlib_JsExn.js @@ -6,7 +6,6 @@ function fromException(exn) { if (exn.RE_EXN_ID === "JsExn") { return Primitive_option.some(exn._1); } - } let getOrUndefined = (fieldName => t => (t && typeof t[fieldName] === "string" ? t[fieldName] : undefined)); diff --git a/packages/@rescript/runtime/lib/es6/Stdlib_List.js b/packages/@rescript/runtime/lib/es6/Stdlib_List.js index 7870e1adc4..89ab1ce958 100644 --- a/packages/@rescript/runtime/lib/es6/Stdlib_List.js +++ b/packages/@rescript/runtime/lib/es6/Stdlib_List.js @@ -8,7 +8,6 @@ function head(x) { if (x !== 0) { return Primitive_option.some(x.hd); } - } function headOrThrow(x) { @@ -25,7 +24,6 @@ function tail(x) { if (x !== 0) { return x.tl; } - } function tailOrThrow(x) { @@ -445,7 +443,6 @@ function take(lst, n) { if (has) { return cell; } - } function drop(lst, n) { @@ -494,7 +491,6 @@ function splitAt(lst, n) { rest ]; } - } function concat(xs, ys) { diff --git a/packages/@rescript/runtime/lib/es6/Stdlib_Null.js b/packages/@rescript/runtime/lib/es6/Stdlib_Null.js index 9a61308435..436315a43b 100644 --- a/packages/@rescript/runtime/lib/es6/Stdlib_Null.js +++ b/packages/@rescript/runtime/lib/es6/Stdlib_Null.js @@ -42,7 +42,6 @@ function forEach(value, f) { if (value !== null) { return f(value); } - } function map(value, f) { diff --git a/packages/@rescript/runtime/lib/es6/Stdlib_Nullable.js b/packages/@rescript/runtime/lib/es6/Stdlib_Nullable.js index 6763f42b6f..1d7b479d84 100644 --- a/packages/@rescript/runtime/lib/es6/Stdlib_Nullable.js +++ b/packages/@rescript/runtime/lib/es6/Stdlib_Nullable.js @@ -7,7 +7,6 @@ function fromOption(option) { if (option !== undefined) { return Primitive_option.valFromOption(option); } - } function equal(a, b, eq) { @@ -41,7 +40,6 @@ function forEach(value, f) { if (!(value == null)) { return f(value); } - } function map(value, f) { diff --git a/packages/@rescript/runtime/lib/es6/Stdlib_Option.js b/packages/@rescript/runtime/lib/es6/Stdlib_Option.js index 228dc804ae..375b5cd59b 100644 --- a/packages/@rescript/runtime/lib/es6/Stdlib_Option.js +++ b/packages/@rescript/runtime/lib/es6/Stdlib_Option.js @@ -7,14 +7,12 @@ function filter(opt, p) { if (opt !== undefined && p(Primitive_option.valFromOption(opt))) { return opt; } - } function forEach(opt, f) { if (opt !== undefined) { return f(Primitive_option.valFromOption(opt)); } - } function getOrThrow(x, message) { @@ -37,14 +35,12 @@ function map(opt, f) { if (opt !== undefined) { return Primitive_option.some(f(Primitive_option.valFromOption(opt))); } - } function flatMap(opt, f) { if (opt !== undefined) { return f(Primitive_option.valFromOption(opt)); } - } function getOr(opt, $$default) { @@ -126,7 +122,6 @@ function all2(param) { Primitive_option.valFromOption(b) ]; } - } function all3(param) { @@ -140,7 +135,6 @@ function all3(param) { Primitive_option.valFromOption(c) ]; } - } function all4(param) { @@ -156,7 +150,6 @@ function all4(param) { Primitive_option.valFromOption(d) ]; } - } function all5(param) { @@ -174,7 +167,6 @@ function all5(param) { Primitive_option.valFromOption(e) ]; } - } function all6(param) { @@ -194,7 +186,6 @@ function all6(param) { Primitive_option.valFromOption(f) ]; } - } let getExn = getOrThrow; diff --git a/packages/@rescript/runtime/lib/es6/Stdlib_Result.js b/packages/@rescript/runtime/lib/es6/Stdlib_Result.js index f3f9f0e5cb..dce1eab078 100644 --- a/packages/@rescript/runtime/lib/es6/Stdlib_Result.js +++ b/packages/@rescript/runtime/lib/es6/Stdlib_Result.js @@ -83,7 +83,6 @@ function forEach(r, f) { if (r.TAG === "Ok") { return f(r._0); } - } function mapError(r, f) { diff --git a/packages/@rescript/runtime/lib/es6/Stdlib_String.js b/packages/@rescript/runtime/lib/es6/Stdlib_String.js index 3225a94a82..fe2fd6dda1 100644 --- a/packages/@rescript/runtime/lib/es6/Stdlib_String.js +++ b/packages/@rescript/runtime/lib/es6/Stdlib_String.js @@ -15,7 +15,6 @@ function indexOfOpt(s, search) { if (index !== -1) { return index; } - } function lastIndexOfOpt(s, search) { @@ -23,7 +22,6 @@ function lastIndexOfOpt(s, search) { if (index !== -1) { return index; } - } function searchOpt(s, re) { @@ -31,7 +29,6 @@ function searchOpt(s, re) { if (index !== -1) { return index; } - } function isEmpty(s) { diff --git a/packages/@rescript/runtime/lib/js/Belt_Array.js b/packages/@rescript/runtime/lib/js/Belt_Array.js index 821fcc18df..74064ffda1 100644 --- a/packages/@rescript/runtime/lib/js/Belt_Array.js +++ b/packages/@rescript/runtime/lib/js/Belt_Array.js @@ -7,7 +7,6 @@ function get(arr, i) { if (i >= 0 && i < arr.length) { return Primitive_option.some(arr[i]); } - } function getOrThrow(arr, i) { @@ -328,7 +327,6 @@ function keep(a, f) { r[j] = v; j = j + 1 | 0; } - } r.length = j; return r; @@ -344,7 +342,6 @@ function keepWithIndex(a, f) { r[j] = v; j = j + 1 | 0; } - } r.length = j; return r; @@ -361,7 +358,6 @@ function keepMap(a, f) { r[j] = Primitive_option.valFromOption(v$1); j = j + 1 | 0; } - } r.length = j; return r; diff --git a/packages/@rescript/runtime/lib/js/Belt_HashMap.js b/packages/@rescript/runtime/lib/js/Belt_HashMap.js index 6bd8b97a2d..e449dad0b5 100644 --- a/packages/@rescript/runtime/lib/js/Belt_HashMap.js +++ b/packages/@rescript/runtime/lib/js/Belt_HashMap.js @@ -57,7 +57,6 @@ function set0(h, key, value, eq, hash) { }; h.size = h.size + 1 | 0; } - } else { h_buckets[i] = { key: key, @@ -84,11 +83,9 @@ function set0(h, key, value, eq, hash) { if (tail !== undefined) { tail.next = undefined; } - } return; } - } function set(h, key, value) { @@ -166,7 +163,6 @@ function get(h, key) { }; } } - } function has(h, key) { diff --git a/packages/@rescript/runtime/lib/js/Belt_HashMapInt.js b/packages/@rescript/runtime/lib/js/Belt_HashMapInt.js index 3aff60b364..a235478541 100644 --- a/packages/@rescript/runtime/lib/js/Belt_HashMapInt.js +++ b/packages/@rescript/runtime/lib/js/Belt_HashMapInt.js @@ -54,7 +54,6 @@ function set(h, key, value) { }; h.size = h.size + 1 | 0; } - } else { h_buckets[i] = { key: key, @@ -81,11 +80,9 @@ function set(h, key, value) { if (tail !== undefined) { tail.next = undefined; } - } return; } - } function remove(h, key) { @@ -118,7 +115,6 @@ function remove(h, key) { }; } } - } function get(h, key) { @@ -157,7 +153,6 @@ function get(h, key) { }; } } - } function has(h, key) { diff --git a/packages/@rescript/runtime/lib/js/Belt_HashMapString.js b/packages/@rescript/runtime/lib/js/Belt_HashMapString.js index 73e1847781..6995ca409f 100644 --- a/packages/@rescript/runtime/lib/js/Belt_HashMapString.js +++ b/packages/@rescript/runtime/lib/js/Belt_HashMapString.js @@ -54,7 +54,6 @@ function set(h, key, value) { }; h.size = h.size + 1 | 0; } - } else { h_buckets[i] = { key: key, @@ -81,11 +80,9 @@ function set(h, key, value) { if (tail !== undefined) { tail.next = undefined; } - } return; } - } function remove(h, key) { @@ -118,7 +115,6 @@ function remove(h, key) { }; } } - } function get(h, key) { @@ -157,7 +153,6 @@ function get(h, key) { }; } } - } function has(h, key) { diff --git a/packages/@rescript/runtime/lib/js/Belt_HashSet.js b/packages/@rescript/runtime/lib/js/Belt_HashSet.js index 0897d41ebb..72b8e0d703 100644 --- a/packages/@rescript/runtime/lib/js/Belt_HashSet.js +++ b/packages/@rescript/runtime/lib/js/Belt_HashSet.js @@ -111,11 +111,9 @@ function add0(h, key, hash, eq) { if (tail !== undefined) { tail.next = undefined; } - } return; } - } function add(h, key) { diff --git a/packages/@rescript/runtime/lib/js/Belt_HashSetInt.js b/packages/@rescript/runtime/lib/js/Belt_HashSetInt.js index db0c833e84..3ee8effd9c 100644 --- a/packages/@rescript/runtime/lib/js/Belt_HashSetInt.js +++ b/packages/@rescript/runtime/lib/js/Belt_HashSetInt.js @@ -111,11 +111,9 @@ function add(h, key) { if (tail !== undefined) { tail.next = undefined; } - } return; } - } function has(h, key) { diff --git a/packages/@rescript/runtime/lib/js/Belt_HashSetString.js b/packages/@rescript/runtime/lib/js/Belt_HashSetString.js index d2779cf4ff..5a00071806 100644 --- a/packages/@rescript/runtime/lib/js/Belt_HashSetString.js +++ b/packages/@rescript/runtime/lib/js/Belt_HashSetString.js @@ -111,11 +111,9 @@ function add(h, key) { if (tail !== undefined) { tail.next = undefined; } - } return; } - } function has(h, key) { diff --git a/packages/@rescript/runtime/lib/js/Belt_List.js b/packages/@rescript/runtime/lib/js/Belt_List.js index 67a8420ea1..7d7b13e596 100644 --- a/packages/@rescript/runtime/lib/js/Belt_List.js +++ b/packages/@rescript/runtime/lib/js/Belt_List.js @@ -8,7 +8,6 @@ function head(x) { if (x !== 0) { return Primitive_option.some(x.hd); } - } function headOrThrow(x) { @@ -25,7 +24,6 @@ function tail(x) { if (x !== 0) { return x.tl; } - } function tailOrThrow(x) { @@ -445,7 +443,6 @@ function take(lst, n) { if (has) { return cell; } - } function drop(lst, n) { @@ -494,7 +491,6 @@ function splitAt(lst, n) { rest ]; } - } function concat(xs, ys) { diff --git a/packages/@rescript/runtime/lib/js/Belt_MapDict.js b/packages/@rescript/runtime/lib/js/Belt_MapDict.js index 5670c17c3f..ab109c6bbb 100644 --- a/packages/@rescript/runtime/lib/js/Belt_MapDict.js +++ b/packages/@rescript/runtime/lib/js/Belt_MapDict.js @@ -121,7 +121,6 @@ function remove(n, x, cmp) { if (n !== undefined) { return removeAux0(n, x, cmp); } - } function mergeMany(h, arr, cmp) { @@ -255,7 +254,6 @@ function removeMany(t, keys, cmp) { continue; }; } - } let empty; diff --git a/packages/@rescript/runtime/lib/js/Belt_MapInt.js b/packages/@rescript/runtime/lib/js/Belt_MapInt.js index 2af4751304..bbd0358040 100644 --- a/packages/@rescript/runtime/lib/js/Belt_MapInt.js +++ b/packages/@rescript/runtime/lib/js/Belt_MapInt.js @@ -113,7 +113,6 @@ function remove(n, x) { if (n !== undefined) { return removeAux(n, x); } - } function removeMany(t, keys) { @@ -137,7 +136,6 @@ function removeMany(t, keys) { continue; }; } - } function mergeMany(h, arr) { diff --git a/packages/@rescript/runtime/lib/js/Belt_MapString.js b/packages/@rescript/runtime/lib/js/Belt_MapString.js index 176f0398d2..a6f79ad476 100644 --- a/packages/@rescript/runtime/lib/js/Belt_MapString.js +++ b/packages/@rescript/runtime/lib/js/Belt_MapString.js @@ -113,7 +113,6 @@ function remove(n, x) { if (n !== undefined) { return removeAux(n, x); } - } function removeMany(t, keys) { @@ -137,7 +136,6 @@ function removeMany(t, keys) { continue; }; } - } function mergeMany(h, arr) { diff --git a/packages/@rescript/runtime/lib/js/Belt_MutableMap.js b/packages/@rescript/runtime/lib/js/Belt_MutableMap.js index ec7301688b..c4b163e057 100644 --- a/packages/@rescript/runtime/lib/js/Belt_MutableMap.js +++ b/packages/@rescript/runtime/lib/js/Belt_MutableMap.js @@ -50,7 +50,6 @@ function remove(d, k) { d.data = newRoot; return; } - } function removeArrayMutateAux(_t, xs, _i, len, cmp) { @@ -82,7 +81,6 @@ function removeMany(d, xs) { d.data = newRoot; return; } - } function updateDone(t, x, f, cmp) { @@ -132,7 +130,6 @@ function update(t, x, f) { t.data = newRoot; return; } - } function make(id) { @@ -280,7 +277,6 @@ function set(m, e, v) { m.data = newRoot; return; } - } function mergeManyAux(t, xs, cmp) { @@ -299,7 +295,6 @@ function mergeMany(d, xs) { d.data = newRoot; return; } - } let Int; diff --git a/packages/@rescript/runtime/lib/js/Belt_MutableMapInt.js b/packages/@rescript/runtime/lib/js/Belt_MutableMapInt.js index f8f1ab1102..a7167dcc91 100644 --- a/packages/@rescript/runtime/lib/js/Belt_MutableMapInt.js +++ b/packages/@rescript/runtime/lib/js/Belt_MutableMapInt.js @@ -58,7 +58,6 @@ function set(m, k, v) { m.data = v$1; return; } - } function forEach(d, f) { @@ -161,7 +160,6 @@ function remove(d, v) { d.data = newRoot; return; } - } function updateDone(t, x, f) { @@ -211,7 +209,6 @@ function update(t, x, f) { t.data = newRoot; return; } - } function removeArrayMutateAux(_t, xs, _i, len) { @@ -243,7 +240,6 @@ function removeMany(d, xs) { d.data = newRoot; return; } - } function fromArray(xs) { diff --git a/packages/@rescript/runtime/lib/js/Belt_MutableMapString.js b/packages/@rescript/runtime/lib/js/Belt_MutableMapString.js index 21dedc4f3e..5e482b561e 100644 --- a/packages/@rescript/runtime/lib/js/Belt_MutableMapString.js +++ b/packages/@rescript/runtime/lib/js/Belt_MutableMapString.js @@ -58,7 +58,6 @@ function set(m, k, v) { m.data = v$1; return; } - } function forEach(d, f) { @@ -161,7 +160,6 @@ function remove(d, v) { d.data = newRoot; return; } - } function updateDone(t, x, f) { @@ -211,7 +209,6 @@ function update(t, x, f) { t.data = newRoot; return; } - } function removeArrayMutateAux(_t, xs, _i, len) { @@ -243,7 +240,6 @@ function removeMany(d, xs) { d.data = newRoot; return; } - } function fromArray(xs) { diff --git a/packages/@rescript/runtime/lib/js/Belt_MutableQueue.js b/packages/@rescript/runtime/lib/js/Belt_MutableQueue.js index cdc9588cc5..992964c12a 100644 --- a/packages/@rescript/runtime/lib/js/Belt_MutableQueue.js +++ b/packages/@rescript/runtime/lib/js/Belt_MutableQueue.js @@ -38,7 +38,6 @@ function peek(q) { if (v !== undefined) { return Primitive_option.some(v.content); } - } function peekUndefined(q) { @@ -46,7 +45,6 @@ function peekUndefined(q) { if (v !== undefined) { return v.content; } - } function peekOrThrow(q) { diff --git a/packages/@rescript/runtime/lib/js/Belt_MutableSet.js b/packages/@rescript/runtime/lib/js/Belt_MutableSet.js index 610820feab..087b0d856e 100644 --- a/packages/@rescript/runtime/lib/js/Belt_MutableSet.js +++ b/packages/@rescript/runtime/lib/js/Belt_MutableSet.js @@ -49,7 +49,6 @@ function remove(d, v) { d.data = newRoot; return; } - } function removeMany0(_t, xs, _i, len, cmp) { @@ -170,7 +169,6 @@ function add(m, e) { m.data = newRoot; return; } - } function addArrayMutate(t, xs, cmp) { diff --git a/packages/@rescript/runtime/lib/js/Belt_MutableSetInt.js b/packages/@rescript/runtime/lib/js/Belt_MutableSetInt.js index 77f9699739..e5d447ad2e 100644 --- a/packages/@rescript/runtime/lib/js/Belt_MutableSetInt.js +++ b/packages/@rescript/runtime/lib/js/Belt_MutableSetInt.js @@ -49,7 +49,6 @@ function remove(d, v) { d.data = newRoot; return; } - } function removeMany0(_t, xs, _i, len) { @@ -168,7 +167,6 @@ function add(d, k) { d.data = v; return; } - } function addArrayMutate(t, xs) { diff --git a/packages/@rescript/runtime/lib/js/Belt_MutableSetString.js b/packages/@rescript/runtime/lib/js/Belt_MutableSetString.js index 57f8266f66..ffcab1c92b 100644 --- a/packages/@rescript/runtime/lib/js/Belt_MutableSetString.js +++ b/packages/@rescript/runtime/lib/js/Belt_MutableSetString.js @@ -49,7 +49,6 @@ function remove(d, v) { d.data = newRoot; return; } - } function removeMany0(_t, xs, _i, len) { @@ -168,7 +167,6 @@ function add(d, k) { d.data = v; return; } - } function addArrayMutate(t, xs) { diff --git a/packages/@rescript/runtime/lib/js/Belt_MutableStack.js b/packages/@rescript/runtime/lib/js/Belt_MutableStack.js index f7187e00b7..8ab3d94007 100644 --- a/packages/@rescript/runtime/lib/js/Belt_MutableStack.js +++ b/packages/@rescript/runtime/lib/js/Belt_MutableStack.js @@ -30,7 +30,6 @@ function topUndefined(s) { if (x !== undefined) { return x.head; } - } function top(s) { @@ -38,7 +37,6 @@ function top(s) { if (x !== undefined) { return Primitive_option.some(x.head); } - } function isEmpty(s) { @@ -51,7 +49,6 @@ function popUndefined(s) { s.root = x.tail; return x.head; } - } function pop(s) { @@ -60,7 +57,6 @@ function pop(s) { s.root = x.tail; return Primitive_option.some(x.head); } - } function size(s) { diff --git a/packages/@rescript/runtime/lib/js/Belt_Option.js b/packages/@rescript/runtime/lib/js/Belt_Option.js index 3148003850..55b7242039 100644 --- a/packages/@rescript/runtime/lib/js/Belt_Option.js +++ b/packages/@rescript/runtime/lib/js/Belt_Option.js @@ -6,14 +6,12 @@ function keep(opt, p) { if (opt !== undefined && p(Primitive_option.valFromOption(opt))) { return opt; } - } function forEach(opt, f) { if (opt !== undefined) { return f(Primitive_option.valFromOption(opt)); } - } function getOrThrow(x) { @@ -38,14 +36,12 @@ function map(opt, f) { if (opt !== undefined) { return Primitive_option.some(f(Primitive_option.valFromOption(opt))); } - } function flatMap(opt, f) { if (opt !== undefined) { return f(Primitive_option.valFromOption(opt)); } - } function getWithDefault(opt, $$default) { diff --git a/packages/@rescript/runtime/lib/js/Belt_internalAVLset.js b/packages/@rescript/runtime/lib/js/Belt_internalAVLset.js index 0c97faaf22..7839c1fad3 100644 --- a/packages/@rescript/runtime/lib/js/Belt_internalAVLset.js +++ b/packages/@rescript/runtime/lib/js/Belt_internalAVLset.js @@ -98,14 +98,12 @@ function minimum(n) { if (n !== undefined) { return Primitive_option.some(min0Aux(n)); } - } function minUndefined(n) { if (n !== undefined) { return min0Aux(n); } - } function max0Aux(_n) { @@ -124,14 +122,12 @@ function maximum(n) { if (n !== undefined) { return Primitive_option.some(max0Aux(n)); } - } function maxUndefined(n) { if (n !== undefined) { return max0Aux(n); } - } function removeMinAuxWithRef(n, v) { diff --git a/packages/@rescript/runtime/lib/js/Belt_internalAVLtree.js b/packages/@rescript/runtime/lib/js/Belt_internalAVLtree.js index ff417e0b6e..1b15b391fa 100644 --- a/packages/@rescript/runtime/lib/js/Belt_internalAVLtree.js +++ b/packages/@rescript/runtime/lib/js/Belt_internalAVLtree.js @@ -120,14 +120,12 @@ function minKey(n) { if (n !== undefined) { return Primitive_option.some(minKey0Aux(n)); } - } function minKeyUndefined(n) { if (n !== undefined) { return minKey0Aux(n); } - } function maxKey0Aux(_n) { @@ -146,14 +144,12 @@ function maxKey(n) { if (n !== undefined) { return Primitive_option.some(maxKey0Aux(n)); } - } function maxKeyUndefined(n) { if (n !== undefined) { return maxKey0Aux(n); } - } function minKV0Aux(_n) { @@ -175,14 +171,12 @@ function minimum(n) { if (n !== undefined) { return minKV0Aux(n); } - } function minUndefined(n) { if (n !== undefined) { return minKV0Aux(n); } - } function maxKV0Aux(_n) { @@ -204,14 +198,12 @@ function maximum(n) { if (n !== undefined) { return maxKV0Aux(n); } - } function maxUndefined(n) { if (n !== undefined) { return maxKV0Aux(n); } - } function removeMinAuxWithRef(n, kr, vr) { @@ -266,7 +258,6 @@ function findFirstBy(n, p) { if (right !== undefined) { return right; } - } function forEach(_n, f) { diff --git a/packages/@rescript/runtime/lib/js/Belt_internalBuckets.js b/packages/@rescript/runtime/lib/js/Belt_internalBuckets.js index 9bd1a43c7d..4350b64f98 100644 --- a/packages/@rescript/runtime/lib/js/Belt_internalBuckets.js +++ b/packages/@rescript/runtime/lib/js/Belt_internalBuckets.js @@ -176,7 +176,6 @@ function keepMapInPlace(h, f) { if (v !== undefined) { filterMapInplaceBucket(f, h, i, undefined, v); } - } } @@ -222,7 +221,6 @@ function linear(h, f) { if (cell !== undefined) { current = fillArrayMap(current, arr, cell, f); } - } return arr; } diff --git a/packages/@rescript/runtime/lib/js/Belt_internalMapInt.js b/packages/@rescript/runtime/lib/js/Belt_internalMapInt.js index 22b66b1625..3c307c6d51 100644 --- a/packages/@rescript/runtime/lib/js/Belt_internalMapInt.js +++ b/packages/@rescript/runtime/lib/js/Belt_internalMapInt.js @@ -195,7 +195,6 @@ function merge(s1, s2, f) { let match = split(v1, s2); return Belt_internalAVLtree.concatOrJoin(merge(l1, match[0], f), v1, f(v1, Primitive_option.some(d1), match[1]), merge(r1, match[2], f)); } - } else if (s2 === undefined) { return; } diff --git a/packages/@rescript/runtime/lib/js/Belt_internalMapString.js b/packages/@rescript/runtime/lib/js/Belt_internalMapString.js index dc0aa2b072..4b18cb7e96 100644 --- a/packages/@rescript/runtime/lib/js/Belt_internalMapString.js +++ b/packages/@rescript/runtime/lib/js/Belt_internalMapString.js @@ -195,7 +195,6 @@ function merge(s1, s2, f) { let match = split(v1, s2); return Belt_internalAVLtree.concatOrJoin(merge(l1, match[0], f), v1, f(v1, Primitive_option.some(d1), match[1]), merge(r1, match[2], f)); } - } else if (s2 === undefined) { return; } diff --git a/packages/@rescript/runtime/lib/js/Belt_internalSetBuckets.js b/packages/@rescript/runtime/lib/js/Belt_internalSetBuckets.js index 0e6eeadea5..40a5ccde9e 100644 --- a/packages/@rescript/runtime/lib/js/Belt_internalSetBuckets.js +++ b/packages/@rescript/runtime/lib/js/Belt_internalSetBuckets.js @@ -107,7 +107,6 @@ function toArray(h) { if (cell !== undefined) { current = fillArray(current, arr, cell); } - } return arr; } diff --git a/packages/@rescript/runtime/lib/js/Js_dict.js b/packages/@rescript/runtime/lib/js/Js_dict.js index d696550db9..df24a6a942 100644 --- a/packages/@rescript/runtime/lib/js/Js_dict.js +++ b/packages/@rescript/runtime/lib/js/Js_dict.js @@ -6,7 +6,6 @@ function get(dict, k) { if ((k in dict)) { return Primitive_option.some(dict[k]); } - } let unsafeDeleteKey = (function (dict,key){ diff --git a/packages/@rescript/runtime/lib/js/Js_json.js b/packages/@rescript/runtime/lib/js/Js_json.js index 3dd01e8000..d4d0ee4f35 100644 --- a/packages/@rescript/runtime/lib/js/Js_json.js +++ b/packages/@rescript/runtime/lib/js/Js_json.js @@ -61,42 +61,36 @@ function decodeString(json) { if (typeof json === "string") { return json; } - } function decodeNumber(json) { if (typeof json === "number") { return json; } - } function decodeObject(json) { if (typeof json === "object" && !Array.isArray(json) && json !== null) { return json; } - } function decodeArray(json) { if (Array.isArray(json)) { return json; } - } function decodeBoolean(json) { if (typeof json === "boolean") { return json; } - } function decodeNull(json) { if (json === null) { return null; } - } let patch = (function (json) { diff --git a/packages/@rescript/runtime/lib/js/Js_null.js b/packages/@rescript/runtime/lib/js/Js_null.js index 62b353c491..1ae74c1476 100644 --- a/packages/@rescript/runtime/lib/js/Js_null.js +++ b/packages/@rescript/runtime/lib/js/Js_null.js @@ -25,7 +25,6 @@ function iter(x, f) { if (x !== null) { return f(x); } - } function fromOption(x) { diff --git a/packages/@rescript/runtime/lib/js/Js_null_undefined.js b/packages/@rescript/runtime/lib/js/Js_null_undefined.js index f57108e872..f73477e66c 100644 --- a/packages/@rescript/runtime/lib/js/Js_null_undefined.js +++ b/packages/@rescript/runtime/lib/js/Js_null_undefined.js @@ -14,14 +14,12 @@ function iter(x, f) { if (!(x == null)) { return f(x); } - } function fromOption(x) { if (x !== undefined) { return Primitive_option.valFromOption(x); } - } let from_opt = fromOption; diff --git a/packages/@rescript/runtime/lib/js/Js_option.js b/packages/@rescript/runtime/lib/js/Js_option.js index d8aef779ea..47cf607a12 100644 --- a/packages/@rescript/runtime/lib/js/Js_option.js +++ b/packages/@rescript/runtime/lib/js/Js_option.js @@ -45,14 +45,12 @@ function andThen(f, x) { if (x !== undefined) { return f(Primitive_option.valFromOption(x)); } - } function map(f, x) { if (x !== undefined) { return Primitive_option.some(f(Primitive_option.valFromOption(x))); } - } function getWithDefault(a, x) { @@ -71,7 +69,6 @@ function filter(f, x) { if (f(x$1)) { return Primitive_option.some(x$1); } - } function firstSome(a, b) { diff --git a/packages/@rescript/runtime/lib/js/Js_undefined.js b/packages/@rescript/runtime/lib/js/Js_undefined.js index 60ff11d2f8..18db0bb12e 100644 --- a/packages/@rescript/runtime/lib/js/Js_undefined.js +++ b/packages/@rescript/runtime/lib/js/Js_undefined.js @@ -23,7 +23,6 @@ function bind(x, f) { if (x$1 !== undefined) { return f(Primitive_option.valFromOption(x$1)); } - } function iter(x, f) { @@ -31,14 +30,12 @@ function iter(x, f) { if (x$1 !== undefined) { return f(Primitive_option.valFromOption(x$1)); } - } function fromOption(x) { if (x !== undefined) { return Primitive_option.valFromOption(x); } - } let from_opt = fromOption; diff --git a/packages/@rescript/runtime/lib/js/Primitive_hash.js b/packages/@rescript/runtime/lib/js/Primitive_hash.js index e501682ae1..0db63f10e7 100644 --- a/packages/@rescript/runtime/lib/js/Primitive_hash.js +++ b/packages/@rescript/runtime/lib/js/Primitive_hash.js @@ -136,7 +136,6 @@ function hash(count, _limit, seed, obj) { s = hash_mix_int(s, (size$1 << 10) | 0); } } - }; return hash_final_mix(s); } diff --git a/packages/@rescript/runtime/lib/js/Primitive_object.js b/packages/@rescript/runtime/lib/js/Primitive_object.js index b747f0665c..e03b918e21 100644 --- a/packages/@rescript/runtime/lib/js/Primitive_object.js +++ b/packages/@rescript/runtime/lib/js/Primitive_object.js @@ -266,14 +266,12 @@ function equal(a, b) { result.contents = false; return; } - }; let do_key_b = key => { if (!Object.prototype.hasOwnProperty.call(a, key) || !equal(b[key], a[key])) { result.contents = false; return; } - }; for_in(a, do_key_a); if (result.contents) { diff --git a/packages/@rescript/runtime/lib/js/Stdlib_Array.js b/packages/@rescript/runtime/lib/js/Stdlib_Array.js index 8ba24ecfdb..bd2340a70c 100644 --- a/packages/@rescript/runtime/lib/js/Stdlib_Array.js +++ b/packages/@rescript/runtime/lib/js/Stdlib_Array.js @@ -75,7 +75,6 @@ function indexOfOpt(arr, item) { if (index !== -1) { return index; } - } function lastIndexOfOpt(arr, item) { @@ -83,7 +82,6 @@ function lastIndexOfOpt(arr, item) { if (index !== -1) { return index; } - } function reduce(arr, init, f) { @@ -107,7 +105,6 @@ function findIndexOpt(array, finder) { if (index !== -1) { return index; } - } function findLastIndexOpt(array, finder) { @@ -115,7 +112,6 @@ function findLastIndexOpt(array, finder) { if (index !== -1) { return index; } - } function swapUnsafe(xs, i, j) { @@ -152,7 +148,6 @@ function filterMap(a, f) { r[j] = Primitive_option.valFromOption(v$1); j = j + 1 | 0; } - } r.length = j; return r; @@ -173,7 +168,6 @@ function filterMapWithIndex(a, f) { r[j] = Primitive_option.valFromOption(v$1); j = j + 1 | 0; } - } r.length = j; return r; diff --git a/packages/@rescript/runtime/lib/js/Stdlib_Error.js b/packages/@rescript/runtime/lib/js/Stdlib_Error.js index 58cf31a222..1421bc57c6 100644 --- a/packages/@rescript/runtime/lib/js/Stdlib_Error.js +++ b/packages/@rescript/runtime/lib/js/Stdlib_Error.js @@ -7,7 +7,6 @@ function fromException(exn) { if (exn.RE_EXN_ID === Stdlib_Exn.$$Error) { return Primitive_option.some(exn._1); } - } let $$EvalError = {}; diff --git a/packages/@rescript/runtime/lib/js/Stdlib_Exn.js b/packages/@rescript/runtime/lib/js/Stdlib_Exn.js index 80dd97cc96..8bcddf0f53 100644 --- a/packages/@rescript/runtime/lib/js/Stdlib_Exn.js +++ b/packages/@rescript/runtime/lib/js/Stdlib_Exn.js @@ -8,7 +8,6 @@ function asJsExn(exn) { if (exn.RE_EXN_ID === $$Error) { return Primitive_option.some(exn._1); } - } function raiseError(str) { diff --git a/packages/@rescript/runtime/lib/js/Stdlib_JSON.js b/packages/@rescript/runtime/lib/js/Stdlib_JSON.js index 81558b4625..614b7098ef 100644 --- a/packages/@rescript/runtime/lib/js/Stdlib_JSON.js +++ b/packages/@rescript/runtime/lib/js/Stdlib_JSON.js @@ -44,42 +44,36 @@ function bool(json) { if (typeof json === "boolean") { return json; } - } function $$null(json) { if (json === null) { return null; } - } function string(json) { if (typeof json === "string") { return json; } - } function float(json) { if (typeof json === "number") { return json; } - } function object(json) { if (typeof json === "object" && json !== null && !Array.isArray(json)) { return json; } - } function array(json) { if (Array.isArray(json)) { return json; } - } let Decode = { diff --git a/packages/@rescript/runtime/lib/js/Stdlib_JsExn.js b/packages/@rescript/runtime/lib/js/Stdlib_JsExn.js index c89eb0d97e..f8df462d8e 100644 --- a/packages/@rescript/runtime/lib/js/Stdlib_JsExn.js +++ b/packages/@rescript/runtime/lib/js/Stdlib_JsExn.js @@ -6,7 +6,6 @@ function fromException(exn) { if (exn.RE_EXN_ID === "JsExn") { return Primitive_option.some(exn._1); } - } let getOrUndefined = (fieldName => t => (t && typeof t[fieldName] === "string" ? t[fieldName] : undefined)); diff --git a/packages/@rescript/runtime/lib/js/Stdlib_List.js b/packages/@rescript/runtime/lib/js/Stdlib_List.js index 4dc975dffc..9bb35a6e86 100644 --- a/packages/@rescript/runtime/lib/js/Stdlib_List.js +++ b/packages/@rescript/runtime/lib/js/Stdlib_List.js @@ -8,7 +8,6 @@ function head(x) { if (x !== 0) { return Primitive_option.some(x.hd); } - } function headOrThrow(x) { @@ -25,7 +24,6 @@ function tail(x) { if (x !== 0) { return x.tl; } - } function tailOrThrow(x) { @@ -445,7 +443,6 @@ function take(lst, n) { if (has) { return cell; } - } function drop(lst, n) { @@ -494,7 +491,6 @@ function splitAt(lst, n) { rest ]; } - } function concat(xs, ys) { diff --git a/packages/@rescript/runtime/lib/js/Stdlib_Null.js b/packages/@rescript/runtime/lib/js/Stdlib_Null.js index 87a40b1b9f..5d61696a5e 100644 --- a/packages/@rescript/runtime/lib/js/Stdlib_Null.js +++ b/packages/@rescript/runtime/lib/js/Stdlib_Null.js @@ -42,7 +42,6 @@ function forEach(value, f) { if (value !== null) { return f(value); } - } function map(value, f) { diff --git a/packages/@rescript/runtime/lib/js/Stdlib_Nullable.js b/packages/@rescript/runtime/lib/js/Stdlib_Nullable.js index abd1601065..131a947d35 100644 --- a/packages/@rescript/runtime/lib/js/Stdlib_Nullable.js +++ b/packages/@rescript/runtime/lib/js/Stdlib_Nullable.js @@ -7,7 +7,6 @@ function fromOption(option) { if (option !== undefined) { return Primitive_option.valFromOption(option); } - } function equal(a, b, eq) { @@ -41,7 +40,6 @@ function forEach(value, f) { if (!(value == null)) { return f(value); } - } function map(value, f) { diff --git a/packages/@rescript/runtime/lib/js/Stdlib_Option.js b/packages/@rescript/runtime/lib/js/Stdlib_Option.js index e6664fe90a..fa977293fe 100644 --- a/packages/@rescript/runtime/lib/js/Stdlib_Option.js +++ b/packages/@rescript/runtime/lib/js/Stdlib_Option.js @@ -7,14 +7,12 @@ function filter(opt, p) { if (opt !== undefined && p(Primitive_option.valFromOption(opt))) { return opt; } - } function forEach(opt, f) { if (opt !== undefined) { return f(Primitive_option.valFromOption(opt)); } - } function getOrThrow(x, message) { @@ -37,14 +35,12 @@ function map(opt, f) { if (opt !== undefined) { return Primitive_option.some(f(Primitive_option.valFromOption(opt))); } - } function flatMap(opt, f) { if (opt !== undefined) { return f(Primitive_option.valFromOption(opt)); } - } function getOr(opt, $$default) { @@ -126,7 +122,6 @@ function all2(param) { Primitive_option.valFromOption(b) ]; } - } function all3(param) { @@ -140,7 +135,6 @@ function all3(param) { Primitive_option.valFromOption(c) ]; } - } function all4(param) { @@ -156,7 +150,6 @@ function all4(param) { Primitive_option.valFromOption(d) ]; } - } function all5(param) { @@ -174,7 +167,6 @@ function all5(param) { Primitive_option.valFromOption(e) ]; } - } function all6(param) { @@ -194,7 +186,6 @@ function all6(param) { Primitive_option.valFromOption(f) ]; } - } let getExn = getOrThrow; diff --git a/packages/@rescript/runtime/lib/js/Stdlib_Result.js b/packages/@rescript/runtime/lib/js/Stdlib_Result.js index a4c2b148c2..8a5c7c0dd1 100644 --- a/packages/@rescript/runtime/lib/js/Stdlib_Result.js +++ b/packages/@rescript/runtime/lib/js/Stdlib_Result.js @@ -83,7 +83,6 @@ function forEach(r, f) { if (r.TAG === "Ok") { return f(r._0); } - } function mapError(r, f) { diff --git a/packages/@rescript/runtime/lib/js/Stdlib_String.js b/packages/@rescript/runtime/lib/js/Stdlib_String.js index 562c0942ab..374e42cdaa 100644 --- a/packages/@rescript/runtime/lib/js/Stdlib_String.js +++ b/packages/@rescript/runtime/lib/js/Stdlib_String.js @@ -15,7 +15,6 @@ function indexOfOpt(s, search) { if (index !== -1) { return index; } - } function lastIndexOfOpt(s, search) { @@ -23,7 +22,6 @@ function lastIndexOfOpt(s, search) { if (index !== -1) { return index; } - } function searchOpt(s, re) { @@ -31,7 +29,6 @@ function searchOpt(s, re) { if (index !== -1) { return index; } - } function isEmpty(s) { diff --git a/tests/tests/src/Import.mjs b/tests/tests/src/Import.mjs index f650eafc63..1609412b8d 100644 --- a/tests/tests/src/Import.mjs +++ b/tests/tests/src/Import.mjs @@ -130,7 +130,6 @@ async function f9(value) { await import("@rescript/runtime/lib/es6/Belt_HashMapInt.js"); return; } - } let each = M1.forEach; diff --git a/tests/tests/src/LetUnwrap.mjs b/tests/tests/src/LetUnwrap.mjs index 9bf42700b7..eaa19cd02a 100644 --- a/tests/tests/src/LetUnwrap.mjs +++ b/tests/tests/src/LetUnwrap.mjs @@ -58,14 +58,12 @@ function doStuffWithOption(s) { if (s === "s") { return "hello"; } - } function doNextStuffWithOption(s) { if (s === "s") { return "hello"; } - } function getXWithOption(s) { diff --git a/tests/tests/src/array_subtle_test.mjs b/tests/tests/src/array_subtle_test.mjs index 9e6a7a51f8..df0e6fb01b 100644 --- a/tests/tests/src/array_subtle_test.mjs +++ b/tests/tests/src/array_subtle_test.mjs @@ -29,7 +29,6 @@ function fff2(x) { console.log("hi"); return; } - } function fff3(x) { diff --git a/tests/tests/src/bal_set_mini.mjs b/tests/tests/src/bal_set_mini.mjs index 11e12c7ba3..1101a278a5 100644 --- a/tests/tests/src/bal_set_mini.mjs +++ b/tests/tests/src/bal_set_mini.mjs @@ -174,7 +174,6 @@ for (let i$1 = 0; i$1 <= 100000; ++i$1) { if (!mem(i$1, v)) { console.log("impossible"); } - } for (let i$2 = 0; i$2 <= 100000; ++i$2) { diff --git a/tests/tests/src/bdd.mjs b/tests/tests/src/bdd.mjs index f98ef56946..7857864637 100644 --- a/tests/tests/src/bdd.mjs +++ b/tests/tests/src/bdd.mjs @@ -373,7 +373,6 @@ function test_hwb(bdd, vars) { if (vars[i]) { ntrue = ntrue + 1 | 0; } - } return bool_equal($$eval(bdd, vars), ntrue > 0 ? vars[ntrue - 1 | 0] : false); } diff --git a/tests/tests/src/belt_list_test.mjs b/tests/tests/src/belt_list_test.mjs index 8aeb03fbfc..008082c1bb 100644 --- a/tests/tests/src/belt_list_test.mjs +++ b/tests/tests/src/belt_list_test.mjs @@ -2116,7 +2116,6 @@ Mocha.describe("Belt_list_test", () => { if (x % 7 === 0) { return x + 1 | 0; } - }); Test_utils.eq("File \"belt_list_test.res\", line 360, characters 7-14", u1, { hd: 1, @@ -2144,7 +2143,6 @@ Mocha.describe("Belt_list_test", () => { if (x % 2 === 0) { return -x | 0; } - }), { hd: -2, tl: { @@ -2168,7 +2166,6 @@ Mocha.describe("Belt_list_test", () => { if (x % 5 === 0) { return x; } - }) === /* [] */0); }); }); diff --git a/tests/tests/src/bs_array_test.mjs b/tests/tests/src/bs_array_test.mjs index 6d3bc283f2..42582cd700 100644 --- a/tests/tests/src/bs_array_test.mjs +++ b/tests/tests/src/bs_array_test.mjs @@ -311,7 +311,6 @@ Mocha.describe("Bs_array_test", () => { if (x % 2 === 0) { return x + 1 | 0; } - }); Test_utils.eq("File \"bs_array_test.res\", line 152, characters 7-14", v0, [ 0, diff --git a/tests/tests/src/bs_auto_uncurry.mjs b/tests/tests/src/bs_auto_uncurry.mjs index 92dcc6cafb..6b26490efd 100644 --- a/tests/tests/src/bs_auto_uncurry.mjs +++ b/tests/tests/src/bs_auto_uncurry.mjs @@ -46,7 +46,6 @@ function f_01() { console.log("x"); return; } - }); } diff --git a/tests/tests/src/bs_poly_map_test.mjs b/tests/tests/src/bs_poly_map_test.mjs index 3d3b67e0dd..87b61ed0ca 100644 --- a/tests/tests/src/bs_poly_map_test.mjs +++ b/tests/tests/src/bs_poly_map_test.mjs @@ -29,7 +29,6 @@ function mergeInter(s1, s2) { if (v1 !== undefined && v2 !== undefined) { return Primitive_option.some(undefined); } - })), Icmp); } @@ -38,7 +37,6 @@ function mergeUnion(s1, s2) { if (v1 !== undefined || v2 !== undefined) { return Primitive_option.some(undefined); } - })), Icmp); } @@ -47,7 +45,6 @@ function mergeDiff(s1, s2) { if (v1 !== undefined && v2 === undefined) { return Primitive_option.some(undefined); } - })), Icmp); } @@ -82,7 +79,6 @@ Mocha.describe("Bs_poly_map_test", () => { if (k !== undefined) { return k + 1 | 0; } - }); let a5 = Belt_Map.remove(a0, 3); let a6 = Belt_Map.remove(a5, 3); diff --git a/tests/tests/src/bs_queue_test.mjs b/tests/tests/src/bs_queue_test.mjs index 41fc9644e3..353d133fe0 100644 --- a/tests/tests/src/bs_queue_test.mjs +++ b/tests/tests/src/bs_queue_test.mjs @@ -519,7 +519,6 @@ Mocha.describe("Bs_queue_test", () => { Error: new Error() }; } - } for (let i$2 = 1; i$2 <= 10; ++i$2) { if (Belt_MutableQueue.popExn(q2) !== i$2) { @@ -533,7 +532,6 @@ Mocha.describe("Bs_queue_test", () => { Error: new Error() }; } - } }); Mocha.test("queue size and isEmpty operations", () => { @@ -573,7 +571,6 @@ Mocha.describe("Bs_queue_test", () => { Error: new Error() }; } - } for (let i$1 = 10; i$1 >= 1; --i$1) { if (Belt_MutableQueue.size(q) !== i$1) { diff --git a/tests/tests/src/core/Core_ArrayTests.mjs b/tests/tests/src/core/Core_ArrayTests.mjs index 028019754d..d28c3c90f8 100644 --- a/tests/tests/src/core/Core_ArrayTests.mjs +++ b/tests/tests/src/core/Core_ArrayTests.mjs @@ -259,7 +259,6 @@ Test.run([ if (n % 2 === 0) { return n * n | 0; } - }), eq, [ 4, 16, @@ -295,7 +294,6 @@ Test.run([ if (n % 2 === 0) { return n * n | 0; } - }), eq, []); Test.run([ @@ -376,7 +374,6 @@ Test.run([ if (n % 2 === 0) { return n - 8 | 0; } - }), eq, -6); Test.run([ @@ -408,7 +405,6 @@ Test.run([ if (n % 2 === 0) { return n * n | 0; } - }), eq, undefined); Test.run([ diff --git a/tests/tests/src/core/Core_IteratorTests.mjs b/tests/tests/src/core/Core_IteratorTests.mjs index 3b95cb4858..57982ff048 100644 --- a/tests/tests/src/core/Core_IteratorTests.mjs +++ b/tests/tests/src/core/Core_IteratorTests.mjs @@ -21,7 +21,6 @@ iterator.forEach(v => { syncResult.contents = "b"; return; } - }); Test.run([ @@ -53,7 +52,6 @@ await Stdlib_AsyncIterator.forEach(asyncIterator, v => { asyncResult.contents = "second"; return; } - }); Test.run([ diff --git a/tests/tests/src/core/intl/Core_IntlTests.mjs b/tests/tests/src/core/intl/Core_IntlTests.mjs index ecf0306d42..2f718598eb 100644 --- a/tests/tests/src/core/intl/Core_IntlTests.mjs +++ b/tests/tests/src/core/intl/Core_IntlTests.mjs @@ -69,7 +69,6 @@ try { console.warn(`Unexpected error message: "` + message + `"`); throw e$3; } - } else { let e$4 = Stdlib_JsExn.fromException(e$2); if (e$4 !== undefined) { diff --git a/tests/tests/src/flexible_array_test.mjs b/tests/tests/src/flexible_array_test.mjs index 8340514210..58e2becccd 100644 --- a/tests/tests/src/flexible_array_test.mjs +++ b/tests/tests/src/flexible_array_test.mjs @@ -225,7 +225,6 @@ function filter_from(i, p, s) { if (p(ele)) { u = push_back(u, ele); } - } return u; } diff --git a/tests/tests/src/fun_pattern_match.mjs b/tests/tests/src/fun_pattern_match.mjs index 0381c1c2fc..9eb68bfe0d 100644 --- a/tests/tests/src/fun_pattern_match.mjs +++ b/tests/tests/src/fun_pattern_match.mjs @@ -74,7 +74,6 @@ function handle_tuple(x, y) { if (x === 1 && y === 2) { return 3; } - } else if (y === 1) { return 2; } diff --git a/tests/tests/src/gpr_1409_test.mjs b/tests/tests/src/gpr_1409_test.mjs index ce35c249f2..ac8e1b1beb 100644 --- a/tests/tests/src/gpr_1409_test.mjs +++ b/tests/tests/src/gpr_1409_test.mjs @@ -16,7 +16,6 @@ function map(f, x) { if (x !== undefined) { return Primitive_option.some(f(Primitive_option.valFromOption(x))); } - } function make(foo, param) { diff --git a/tests/tests/src/gpr_1891_test.mjs b/tests/tests/src/gpr_1891_test.mjs index 7896f4d914..f418aa93af 100644 --- a/tests/tests/src/gpr_1891_test.mjs +++ b/tests/tests/src/gpr_1891_test.mjs @@ -29,7 +29,6 @@ function foo4(x, h) { if (typeof x === "object" && x.NAME === "Foo" && x.VAL === 3) { return h(); } - } function foo5(x) { diff --git a/tests/tests/src/gpr_3875_test.mjs b/tests/tests/src/gpr_3875_test.mjs index 9903307892..75216c3b6e 100644 --- a/tests/tests/src/gpr_3875_test.mjs +++ b/tests/tests/src/gpr_3875_test.mjs @@ -37,7 +37,6 @@ function compilerBug(a, b, c, f) { } return; } - } if (f()) { result.contents = "Some x, f returns true"; diff --git a/tests/tests/src/gpr_4280_test.mjs b/tests/tests/src/gpr_4280_test.mjs index bf67ae8c11..3a2b3e21e0 100644 --- a/tests/tests/src/gpr_4280_test.mjs +++ b/tests/tests/src/gpr_4280_test.mjs @@ -38,7 +38,6 @@ function fn(authState, route) { }, undefined); return 2; } - } else { let exit$1 = 0; if (typeof route === "object") { @@ -64,7 +63,6 @@ function fn(authState, route) { }, undefined); return 3; } - } console.log(onboardingRoute); div({ diff --git a/tests/tests/src/inline_condition_with_pattern_matching.mjs b/tests/tests/src/inline_condition_with_pattern_matching.mjs index cd79b308b7..a013e290e9 100644 --- a/tests/tests/src/inline_condition_with_pattern_matching.mjs +++ b/tests/tests/src/inline_condition_with_pattern_matching.mjs @@ -46,7 +46,6 @@ if (person2.TAG === "Teacher") { if (exit === 1) { message$1 = person2.reportCard.gpa !== 0.0 ? `Good luck next semester ` + name + `!` : `Come back in ` + (12345)._0.toString() + ` days!`; } - } } diff --git a/tests/tests/src/inline_map2_test.mjs b/tests/tests/src/inline_map2_test.mjs index 5f13ea30b3..cc60ce1826 100644 --- a/tests/tests/src/inline_map2_test.mjs +++ b/tests/tests/src/inline_map2_test.mjs @@ -397,14 +397,12 @@ function Make(Ord) { if (typeof s2 !== "object") { return "Empty"; } - } else { let v1 = s1._1; if (s1._4 >= height(s2)) { let match = split(v1, s2); return concat_or_join(merge(f, s1._0, match[0]), v1, f(v1, Primitive_option.some(s1._2), match[1]), merge(f, s1._3, match[2])); } - } if (typeof s2 !== "object") { throw { @@ -1015,14 +1013,12 @@ function merge(f, s1, s2) { if (typeof s2 !== "object") { return "Empty"; } - } else { let v1 = s1._1; if (s1._4 >= height(s2)) { let match = split(v1, s2); return concat_or_join(merge(f, s1._0, match[0]), v1, f(v1, Primitive_option.some(s1._2), match[1]), merge(f, s1._3, match[2])); } - } if (typeof s2 !== "object") { throw { @@ -1669,14 +1665,12 @@ function merge$1(f, s1, s2) { if (typeof s2 !== "object") { return "Empty"; } - } else { let v1 = s1._1; if (s1._4 >= height$1(s2)) { let match = split$1(v1, s2); return concat_or_join$1(merge$1(f, s1._0, match[0]), v1, f(v1, Primitive_option.some(s1._2), match[1]), merge$1(f, s1._3, match[2])); } - } if (typeof s2 !== "object") { throw { diff --git a/tests/tests/src/inline_record_test.mjs b/tests/tests/src/inline_record_test.mjs index 3a12cd66f7..ce2abbf8e7 100644 --- a/tests/tests/src/inline_record_test.mjs +++ b/tests/tests/src/inline_record_test.mjs @@ -73,7 +73,6 @@ function ff0(x) { x.z = x.z + 1 | 0; return; } - } function ff1(x) { diff --git a/tests/tests/src/js_re_test.mjs b/tests/tests/src/js_re_test.mjs index 449a723c14..aac2aea0f9 100644 --- a/tests/tests/src/js_re_test.mjs +++ b/tests/tests/src/js_re_test.mjs @@ -11,7 +11,6 @@ Mocha.describe("Js_re_test", () => { if (x !== undefined) { return Primitive_option.fromNullable(Primitive_option.valFromOption(x)[1]); } - }; Test_utils.eq("File \"js_re_test.res\", line 31, characters 7-14", "Hi", contentOf("div", "