diff --git a/packages/@rescript/runtime/Belt_Array.res b/packages/@rescript/runtime/Belt_Array.res index ea7c76a86c6..dc1003d273f 100644 --- a/packages/@rescript/runtime/Belt_Array.res +++ b/packages/@rescript/runtime/Belt_Array.res @@ -15,8 +15,6 @@ external getUnsafe: (t<'a>, int) => 'a = "%array_unsafe_get" external setUnsafe: (t<'a>, int, 'a) => unit = "%array_unsafe_set" -external getUndefined: (t<'a>, int) => Js.undefined<'a> = "%array_unsafe_get" - /* external get: 'a t -> int -> 'a = "%array_safe_get" */ let get = (arr, i) => if i >= 0 && i < length(arr) { diff --git a/packages/@rescript/runtime/Belt_Array.resi b/packages/@rescript/runtime/Belt_Array.resi index 1e7969046aa..8f6cac74c56 100644 --- a/packages/@rescript/runtime/Belt_Array.resi +++ b/packages/@rescript/runtime/Belt_Array.resi @@ -59,15 +59,6 @@ no bounds checking; this would cause type error if `i` does not stay within rang */ external getUnsafe: (t<'a>, int) => 'a = "%array_unsafe_get" -/** -`getUndefined(arr, i)` - -It does the samething in the runtime as [`getUnsafe`](); -it is _type safe_ since the return type still track whether it is -in range or not -*/ -external getUndefined: (t<'a>, int) => Js.undefined<'a> = "%array_unsafe_get" - /** `set(arr, n, x)` modifies `arr` in place; it replaces the nth element of `arr` with `x`. Returning `false` means not updated due to out of range. diff --git a/packages/@rescript/runtime/Belt_Map.res b/packages/@rescript/runtime/Belt_Map.res index 2840a2e8b23..ed34be5a221 100644 --- a/packages/@rescript/runtime/Belt_Map.res +++ b/packages/@rescript/runtime/Belt_Map.res @@ -101,18 +101,12 @@ let toArray = m => Dict.toArray(m.data) let keysToArray = m => Dict.keysToArray(m.data) let valuesToArray = m => Dict.valuesToArray(m.data) let minKey = m => Dict.minKey(m.data) -let minKeyUndefined = m => Dict.minKeyUndefined(m.data) let maxKey = m => Dict.maxKey(m.data) -let maxKeyUndefined = m => Dict.maxKeyUndefined(m.data) let minimum = m => Dict.minimum(m.data) -let minUndefined = m => Dict.minUndefined(m.data) let maximum = m => Dict.maximum(m.data) -let maxUndefined = m => Dict.maxUndefined(m.data) let get = (map, x) => Dict.get(~cmp=map.cmp, map.data, x) -let getUndefined = (map, x) => Dict.getUndefined(~cmp=map.cmp, map.data, x) - let getWithDefault = (map, x, def) => Dict.getWithDefault(~cmp=map.cmp, map.data, x, def) let getOrThrow = (map, x) => Dict.getOrThrow(~cmp=map.cmp, map.data, x) diff --git a/packages/@rescript/runtime/Belt_Map.resi b/packages/@rescript/runtime/Belt_Map.resi index fc883223906..78dd3482db0 100644 --- a/packages/@rescript/runtime/Belt_Map.resi +++ b/packages/@rescript/runtime/Belt_Map.resi @@ -295,27 +295,15 @@ let valuesToArray: t<'k, 'v, 'id> => array<'v> /** `minKey(s)` returns the minimum key, None if not exist. */ let minKey: t<'k, _, _> => option<'k> -/** See `Belt.Map.minKey` */ -let minKeyUndefined: t<'k, _, _> => Js.undefined<'k> - /** `maxKey(s)` returns the maximum key, None if not exist. */ let maxKey: t<'k, _, _> => option<'k> -/** See `Belt.Map.maxKey` */ -let maxKeyUndefined: t<'k, _, _> => Js.undefined<'k> - /** `minimum(s)` returns the minimum key value pair, None if not exist. */ let minimum: t<'k, 'v, _> => option<('k, 'v)> -/** See `Belt.Map.minimum` */ -let minUndefined: t<'k, 'v, _> => Js.undefined<('k, 'v)> - /** `maximum(s)` returns the maximum key value pair, None if not exist. */ let maximum: t<'k, 'v, _> => option<('k, 'v)> -/** See `Belt.Map.maximum` */ -let maxUndefined: t<'k, 'v, _> => Js.undefined<('k, 'v)> - /** `get(s, k)` @@ -334,9 +322,6 @@ Belt.Map.get(Belt.Map.fromArray([(2, "2"), (1, "1"), (3, "3")], ~id=module(IntCm */ let get: (t<'k, 'v, 'id>, 'k) => option<'v> -/** See `Belt.Map.get`. Returns `undefined` when not found*/ -let getUndefined: (t<'k, 'v, 'id>, 'k) => Js.undefined<'v> - /** `getWithDefault(s, k, default)` diff --git a/packages/@rescript/runtime/Belt_MapDict.res b/packages/@rescript/runtime/Belt_MapDict.res index 1a751264fab..229ad0e37d1 100644 --- a/packages/@rescript/runtime/Belt_MapDict.res +++ b/packages/@rescript/runtime/Belt_MapDict.res @@ -34,12 +34,7 @@ let minimum = N.minimum let maximum = N.maximum let minKey = N.minKey let maxKey = N.maxKey -let minKeyUndefined = N.minKeyUndefined -let maxKeyUndefined = N.maxKeyUndefined -let minUndefined = N.minUndefined -let maxUndefined = N.maxUndefined let get = N.get -let getUndefined = N.getUndefined let getWithDefault = N.getWithDefault let getOrThrow = N.getOrThrow let getExn = getOrThrow diff --git a/packages/@rescript/runtime/Belt_MapDict.resi b/packages/@rescript/runtime/Belt_MapDict.resi index cfff7c39754..a9b50a30f80 100644 --- a/packages/@rescript/runtime/Belt_MapDict.resi +++ b/packages/@rescript/runtime/Belt_MapDict.resi @@ -115,24 +115,14 @@ let valuesToArray: t<'k, 'a, 'id> => array<'a> let minKey: t<'k, _, _> => option<'k> -let minKeyUndefined: t<'k, _, _> => Js.undefined<'k> - let maxKey: t<'k, _, _> => option<'k> -let maxKeyUndefined: t<'k, _, _> => Js.undefined<'k> - let minimum: t<'k, 'a, _> => option<('k, 'a)> -let minUndefined: t<'k, 'a, _> => Js.undefined<('k, 'a)> - let maximum: t<'k, 'a, _> => option<('k, 'a)> -let maxUndefined: t<'k, 'a, _> => Js.undefined<('k, 'a)> - let get: (t<'k, 'a, 'id>, 'k, ~cmp: cmp<'k, 'id>) => option<'a> -let getUndefined: (t<'k, 'a, 'id>, 'k, ~cmp: cmp<'k, 'id>) => Js.undefined<'a> - let getWithDefault: (t<'k, 'a, 'id>, 'k, 'a, ~cmp: cmp<'k, 'id>) => 'a let getExn: (t<'k, 'a, 'id>, 'k, ~cmp: cmp<'k, 'id>) => 'a diff --git a/packages/@rescript/runtime/Belt_MapInt.res b/packages/@rescript/runtime/Belt_MapInt.res index 2ce7d0d151c..08e2b5486b0 100644 --- a/packages/@rescript/runtime/Belt_MapInt.res +++ b/packages/@rescript/runtime/Belt_MapInt.res @@ -11,13 +11,9 @@ let isEmpty = N.isEmpty /* let singleton = N.singleton */ let minKey = N.minKey -let minKeyUndefined = N.minKeyUndefined let maxKey = N.maxKey -let maxKeyUndefined = N.maxKeyUndefined let minimum = N.minimum -let minUndefined = N.minUndefined let maximum = N.maximum -let maxUndefined = N.maxUndefined let findFirstBy = N.findFirstBy let forEach = N.forEach let map = N.map @@ -169,7 +165,6 @@ let has = I.has let cmp = I.cmp let eq = I.eq let get = I.get -let getUndefined = I.getUndefined let getWithDefault = I.getWithDefault let getOrThrow = I.getOrThrow let getExn = getOrThrow diff --git a/packages/@rescript/runtime/Belt_MapInt.resi b/packages/@rescript/runtime/Belt_MapInt.resi index aa71c5e1c2e..42b2e1de683 100644 --- a/packages/@rescript/runtime/Belt_MapInt.resi +++ b/packages/@rescript/runtime/Belt_MapInt.resi @@ -92,24 +92,14 @@ let valuesToArray: t<'v> => array<'v> let minKey: t<_> => option -let minKeyUndefined: t<_> => Js.undefined - let maxKey: t<_> => option -let maxKeyUndefined: t<_> => Js.undefined - let minimum: t<'v> => option<(key, 'v)> -let minUndefined: t<'v> => Js.undefined<(key, 'v)> - let maximum: t<'v> => option<(key, 'v)> -let maxUndefined: t<'v> => Js.undefined<(key, 'v)> - let get: (t<'v>, key) => option<'v> -let getUndefined: (t<'v>, key) => Js.undefined<'v> - let getWithDefault: (t<'v>, key, 'v) => 'v let getExn: (t<'v>, key) => 'v diff --git a/packages/@rescript/runtime/Belt_MapString.res b/packages/@rescript/runtime/Belt_MapString.res index af592d6c2c3..9f1cbb4e348 100644 --- a/packages/@rescript/runtime/Belt_MapString.res +++ b/packages/@rescript/runtime/Belt_MapString.res @@ -11,13 +11,9 @@ let isEmpty = N.isEmpty /* let singleton = N.singleton */ let minKey = N.minKey -let minKeyUndefined = N.minKeyUndefined let maxKey = N.maxKey -let maxKeyUndefined = N.maxKeyUndefined let minimum = N.minimum -let minUndefined = N.minUndefined let maximum = N.maximum -let maxUndefined = N.maxUndefined let findFirstBy = N.findFirstBy let forEach = N.forEach let map = N.map @@ -169,7 +165,6 @@ let has = I.has let cmp = I.cmp let eq = I.eq let get = I.get -let getUndefined = I.getUndefined let getWithDefault = I.getWithDefault let getOrThrow = I.getOrThrow let getExn = getOrThrow diff --git a/packages/@rescript/runtime/Belt_MapString.resi b/packages/@rescript/runtime/Belt_MapString.resi index 0456a745114..0469496376e 100644 --- a/packages/@rescript/runtime/Belt_MapString.resi +++ b/packages/@rescript/runtime/Belt_MapString.resi @@ -92,24 +92,14 @@ let valuesToArray: t<'v> => array<'v> let minKey: t<_> => option -let minKeyUndefined: t<_> => Js.undefined - let maxKey: t<_> => option -let maxKeyUndefined: t<_> => Js.undefined - let minimum: t<'v> => option<(key, 'v)> -let minUndefined: t<'v> => Js.undefined<(key, 'v)> - let maximum: t<'v> => option<(key, 'v)> -let maxUndefined: t<'v> => Js.undefined<(key, 'v)> - let get: (t<'v>, key) => option<'v> -let getUndefined: (t<'v>, key) => Js.undefined<'v> - let getWithDefault: (t<'v>, key, 'v) => 'v let getExn: (t<'v>, key) => 'v diff --git a/packages/@rescript/runtime/Belt_MutableMap.res b/packages/@rescript/runtime/Belt_MutableMap.res index 87779759dce..2ad66f79be4 100644 --- a/packages/@rescript/runtime/Belt_MutableMap.res +++ b/packages/@rescript/runtime/Belt_MutableMap.res @@ -136,13 +136,9 @@ let clear = m => m.data = None let isEmpty = d => N.isEmpty(d.data) let minKey = m => N.minKey(m.data) -let minKeyUndefined = m => N.minKeyUndefined(m.data) let maxKey = m => N.maxKey(m.data) -let maxKeyUndefined = m => N.maxKeyUndefined(m.data) let minimum = m => N.minimum(m.data) -let minUndefined = m => N.minUndefined(m.data) let maximum = m => N.maximum(m.data) -let maxUndefined = m => N.maxUndefined(m.data) let forEach = (d, f) => N.forEach(d.data, f) let reduce = (d, acc, cb) => N.reduce(d.data, acc, cb) @@ -168,8 +164,6 @@ let map = (m, f) => {cmp: m.cmp, data: N.map(m.data, f)} let mapWithKey = (m, f) => {cmp: m.cmp, data: N.mapWithKey(m.data, f)} let get = (m, x) => N.get(~cmp=m.cmp, m.data, x) -let getUndefined = (m, x) => N.getUndefined(~cmp=m.cmp, m.data, x) - let getWithDefault = (m, x, def) => N.getWithDefault(~cmp=m.cmp, m.data, x, def) let getOrThrow = (m, x) => N.getOrThrow(~cmp=m.cmp, m.data, x) diff --git a/packages/@rescript/runtime/Belt_MutableMap.resi b/packages/@rescript/runtime/Belt_MutableMap.resi index 598d587a793..106d7ac9e8c 100644 --- a/packages/@rescript/runtime/Belt_MutableMap.resi +++ b/packages/@rescript/runtime/Belt_MutableMap.resi @@ -92,15 +92,10 @@ let fromArray: (array<('k, 'a)>, ~id: id<'k, 'id>) => t<'k, 'a, 'id> let keysToArray: t<'k, _, _> => array<'k> let valuesToArray: t<_, 'a, _> => array<'a> let minKey: t<'k, _, _> => option<'k> -let minKeyUndefined: t<'k, _, _> => Js.undefined<'k> let maxKey: t<'k, _, _> => option<'k> -let maxKeyUndefined: t<'k, _, _> => Js.undefined<'k> let minimum: t<'k, 'a, _> => option<('k, 'a)> -let minUndefined: t<'k, 'a, _> => Js.undefined<('k, 'a)> let maximum: t<'k, 'a, _> => option<('k, 'a)> -let maxUndefined: t<'k, 'a, _> => Js.undefined<('k, 'a)> let get: (t<'k, 'a, 'id>, 'k) => option<'a> -let getUndefined: (t<'k, 'a, 'id>, 'k) => Js.undefined<'a> let getWithDefault: (t<'k, 'a, 'id>, 'k, 'a) => 'a let getExn: (t<'k, 'a, 'id>, 'k) => 'a let getOrThrow: (t<'k, 'a, 'id>, 'k) => 'a diff --git a/packages/@rescript/runtime/Belt_MutableMapInt.res b/packages/@rescript/runtime/Belt_MutableMapInt.res index 9f0209a523c..d48571cf566 100644 --- a/packages/@rescript/runtime/Belt_MutableMapInt.res +++ b/packages/@rescript/runtime/Belt_MutableMapInt.res @@ -11,14 +11,10 @@ let isEmpty = m => N.isEmpty(m.data) let clear = m => m.data = None /* let singleton k v = t ~data:(N.singleton k v) */ -let minKeyUndefined = m => N.minKeyUndefined(m.data) let minKey = m => N.minKey(m.data) -let maxKeyUndefined = m => N.maxKeyUndefined(m.data) let maxKey = m => N.maxKey(m.data) let minimum = m => N.minimum(m.data) -let minUndefined = m => N.minUndefined(m.data) let maximum = m => N.maximum(m.data) -let maxUndefined = m => N.maxUndefined(m.data) let set = (m: t<_>, k, v) => { let old_data = m.data @@ -163,7 +159,6 @@ let cmp = (d0, d1, f) => I.cmp(d0.data, d1.data, f) let eq = (d0, d1, f) => I.eq(d0.data, d1.data, f) let get = (d, x) => I.get(d.data, x) -let getUndefined = (d, x) => I.getUndefined(d.data, x) let getWithDefault = (d, x, def) => I.getWithDefault(d.data, x, def) let getOrThrow = (d, x) => I.getOrThrow(d.data, x) let getExn = getOrThrow diff --git a/packages/@rescript/runtime/Belt_MutableMapInt.resi b/packages/@rescript/runtime/Belt_MutableMapInt.resi index a1b5acccb93..cc588d991c3 100644 --- a/packages/@rescript/runtime/Belt_MutableMapInt.resi +++ b/packages/@rescript/runtime/Belt_MutableMapInt.resi @@ -77,15 +77,10 @@ let fromArray: array<(key, 'a)> => t<'a> let keysToArray: t<'a> => array let valuesToArray: t<'a> => array<'a> let minKey: t<_> => option -let minKeyUndefined: t<_> => Js.undefined let maxKey: t<_> => option -let maxKeyUndefined: t<_> => Js.undefined let minimum: t<'a> => option<(key, 'a)> -let minUndefined: t<'a> => Js.undefined<(key, 'a)> let maximum: t<'a> => option<(key, 'a)> -let maxUndefined: t<'a> => Js.undefined<(key, 'a)> let get: (t<'a>, key) => option<'a> -let getUndefined: (t<'a>, key) => Js.undefined<'a> let getWithDefault: (t<'a>, key, 'a) => 'a let getExn: (t<'a>, key) => 'a let getOrThrow: (t<'a>, key) => 'a diff --git a/packages/@rescript/runtime/Belt_MutableMapString.res b/packages/@rescript/runtime/Belt_MutableMapString.res index 8d1a38d4ca0..5aeccb68ca0 100644 --- a/packages/@rescript/runtime/Belt_MutableMapString.res +++ b/packages/@rescript/runtime/Belt_MutableMapString.res @@ -11,14 +11,10 @@ let isEmpty = m => N.isEmpty(m.data) let clear = m => m.data = None /* let singleton k v = t ~data:(N.singleton k v) */ -let minKeyUndefined = m => N.minKeyUndefined(m.data) let minKey = m => N.minKey(m.data) -let maxKeyUndefined = m => N.maxKeyUndefined(m.data) let maxKey = m => N.maxKey(m.data) let minimum = m => N.minimum(m.data) -let minUndefined = m => N.minUndefined(m.data) let maximum = m => N.maximum(m.data) -let maxUndefined = m => N.maxUndefined(m.data) let set = (m: t<_>, k, v) => { let old_data = m.data @@ -163,7 +159,6 @@ let cmp = (d0, d1, f) => I.cmp(d0.data, d1.data, f) let eq = (d0, d1, f) => I.eq(d0.data, d1.data, f) let get = (d, x) => I.get(d.data, x) -let getUndefined = (d, x) => I.getUndefined(d.data, x) let getWithDefault = (d, x, def) => I.getWithDefault(d.data, x, def) let getOrThrow = (d, x) => I.getOrThrow(d.data, x) let getExn = getOrThrow diff --git a/packages/@rescript/runtime/Belt_MutableMapString.resi b/packages/@rescript/runtime/Belt_MutableMapString.resi index 9f47a23d3fd..921c52c24b2 100644 --- a/packages/@rescript/runtime/Belt_MutableMapString.resi +++ b/packages/@rescript/runtime/Belt_MutableMapString.resi @@ -77,15 +77,10 @@ let fromArray: array<(key, 'a)> => t<'a> let keysToArray: t<'a> => array let valuesToArray: t<'a> => array<'a> let minKey: t<_> => option -let minKeyUndefined: t<_> => Js.undefined let maxKey: t<_> => option -let maxKeyUndefined: t<_> => Js.undefined let minimum: t<'a> => option<(key, 'a)> -let minUndefined: t<'a> => Js.undefined<(key, 'a)> let maximum: t<'a> => option<(key, 'a)> -let maxUndefined: t<'a> => Js.undefined<(key, 'a)> let get: (t<'a>, key) => option<'a> -let getUndefined: (t<'a>, key) => Js.undefined<'a> let getWithDefault: (t<'a>, key, 'a) => 'a let getExn: (t<'a>, key) => 'a let getOrThrow: (t<'a>, key) => 'a diff --git a/packages/@rescript/runtime/Belt_MutableQueue.res b/packages/@rescript/runtime/Belt_MutableQueue.res index 6ed8a1763a5..3912f22629b 100644 --- a/packages/@rescript/runtime/Belt_MutableQueue.res +++ b/packages/@rescript/runtime/Belt_MutableQueue.res @@ -54,12 +54,6 @@ let peek = q => | Some(v) => Some(v.content) } -let peekUndefined = q => - switch q.first { - | None => Js.undefined - | Some(v) => Js.Undefined.return(v.content) - } - let peekOrThrow = q => switch q.first { | None => throw(Not_found) @@ -85,13 +79,11 @@ let pop = q => } let popOrThrow = q => - /* TO fix */ switch q.first { | None => throw(Not_found) | Some(x) => let next = x.next if next == None { - /* only one element */ clear(q) x.content } else { @@ -103,22 +95,6 @@ let popOrThrow = q => let popExn = popOrThrow -let popUndefined = q => - switch q.first { - | None => Js.undefined - | Some(x) => - let next = x.next - if next == None { - /* only one element */ - clear(q) - Js.Undefined.return(x.content) - } else { - q.length = q.length - 1 - q.first = next - Js.Undefined.return(x.content) - } - } - let rec copyAux = (qRes, prev, cell) => switch cell { | None => diff --git a/packages/@rescript/runtime/Belt_MutableQueue.resi b/packages/@rescript/runtime/Belt_MutableQueue.resi index ef4e542fbaa..d5f5dbefcae 100644 --- a/packages/@rescript/runtime/Belt_MutableQueue.resi +++ b/packages/@rescript/runtime/Belt_MutableQueue.resi @@ -43,11 +43,6 @@ let add: (t<'a>, 'a) => unit */ let peek: t<'a> => option<'a> -/** -`peekUndefined(q)` returns `undefined` if not found. -*/ -let peekUndefined: t<'a> => Js.undefined<'a> - /** `peekExn(q)` throws an exception if `q` is empty. */ @@ -63,12 +58,6 @@ let peekOrThrow: t<'a> => 'a */ let pop: t<'a> => option<'a> -/** -`popUndefined(q)` removes and returns the first element in queue `q`. it will -return `undefined` if it is already empty. -*/ -let popUndefined: t<'a> => Js.undefined<'a> - /** `popExn(q)` throw an exception if q is empty. */ diff --git a/packages/@rescript/runtime/Belt_MutableSet.res b/packages/@rescript/runtime/Belt_MutableSet.res index c2c54b5e103..f45f1d88757 100644 --- a/packages/@rescript/runtime/Belt_MutableSet.res +++ b/packages/@rescript/runtime/Belt_MutableSet.res @@ -184,9 +184,7 @@ let make = (type value identity, ~id: id) => { let isEmpty = d => N.isEmpty(d.data) let minimum = d => N.minimum(d.data) -let minUndefined = d => N.minUndefined(d.data) let maximum = d => N.maximum(d.data) -let maxUndefined = d => N.maxUndefined(d.data) let forEach = (d, f) => N.forEach(d.data, f) let reduce = (d, acc, cb) => N.reduce(d.data, acc, cb) @@ -215,8 +213,6 @@ let eq = (d0, d1) => N.eq(~cmp=d0.cmp, d0.data, d1.data) let get = (d, x) => N.get(~cmp=d.cmp, d.data, x) -let getUndefined = (d, x) => N.getUndefined(~cmp=d.cmp, d.data, x) - let getOrThrow = (d, x) => N.getOrThrow(~cmp=d.cmp, d.data, x) let getExn = getOrThrow diff --git a/packages/@rescript/runtime/Belt_MutableSet.resi b/packages/@rescript/runtime/Belt_MutableSet.resi index 19b1555677a..a8b31510864 100644 --- a/packages/@rescript/runtime/Belt_MutableSet.resi +++ b/packages/@rescript/runtime/Belt_MutableSet.resi @@ -530,26 +530,6 @@ s1->Belt.MutableSet.minimum == Some(1) */ let minimum: t<'value, 'id> => option<'value> -/** -Returns minimum value of the collection. `undefined` if collection is empty. - -## Examples - -```rescript -module IntCmp = Belt.Id.MakeComparable({ - type t = int - let cmp = Pervasives.compare -}) - -let s0 = Belt.MutableSet.make(~id=module(IntCmp)) -let s1 = Belt.MutableSet.fromArray([3, 2, 1, 5], ~id=module(IntCmp)) - -s0->Belt.MutableSet.minUndefined == Js.undefined -s1->Belt.MutableSet.minUndefined == Js.Undefined.return(1) -``` -*/ -let minUndefined: t<'value, 'id> => Js.undefined<'value> - /** Returns maximum value of the collection. `None` if collection is empty. @@ -570,26 +550,6 @@ s1->Belt.MutableSet.maximum == Some(5) */ let maximum: t<'value, 'id> => option<'value> -/** -Returns maximum value of the collection. `undefined` if collection is empty. - -## Examples - -```rescript -module IntCmp = Belt.Id.MakeComparable({ - type t = int - let cmp = Pervasives.compare -}) - -let s0 = Belt.MutableSet.make(~id=module(IntCmp)) -let s1 = Belt.MutableSet.fromArray([3, 2, 1, 5], ~id=module(IntCmp)) - -s0->Belt.MutableSet.maxUndefined == Js.undefined -s1->Belt.MutableSet.maxUndefined == Js.Undefined.return(5) -``` -*/ -let maxUndefined: t<'value, 'id> => Js.undefined<'value> - /** Returns the reference of the value which is equivalent to value using the comparator specifiecd by this collection. Returns `None` if element does not exist. @@ -609,11 +569,6 @@ s0->Belt.MutableSet.get(20) == None */ let get: (t<'value, 'id>, 'value) => option<'value> -/** -Same as `Belt.MutableSet.get` but returns `undefined` when element does not exist. -*/ -let getUndefined: (t<'value, 'id>, 'value) => Js.undefined<'value> - /** Same as `Belt.MutableSet.get` but throw when element does not exist. */ diff --git a/packages/@rescript/runtime/Belt_MutableSetInt.res b/packages/@rescript/runtime/Belt_MutableSetInt.res index 447c5bad7fc..01b0feac7f5 100644 --- a/packages/@rescript/runtime/Belt_MutableSetInt.res +++ b/packages/@rescript/runtime/Belt_MutableSetInt.res @@ -179,9 +179,7 @@ let make = () => {data: None} let isEmpty = d => N.isEmpty(d.data) let minimum = d => N.minimum(d.data) -let minUndefined = d => N.minUndefined(d.data) let maximum = d => N.maximum(d.data) -let maxUndefined = d => N.maxUndefined(d.data) let forEach = (d, f) => N.forEach(d.data, f) let reduce = (d, acc, cb) => N.reduce(d.data, acc, cb) let every = (d, p) => N.every(d.data, p) @@ -199,7 +197,6 @@ let fromArray = xs => {data: I.fromArray(xs)} let cmp = (d0, d1) => I.cmp(d0.data, d1.data) let eq = (d0, d1) => I.eq(d0.data, d1.data) let get = (d, x) => I.get(d.data, x) -let getUndefined = (d, x) => I.getUndefined(d.data, x) let getOrThrow = (d, x) => I.getOrThrow(d.data, x) let getExn = getOrThrow diff --git a/packages/@rescript/runtime/Belt_MutableSetInt.resi b/packages/@rescript/runtime/Belt_MutableSetInt.resi index e6c5c81bcf9..d64bf370448 100644 --- a/packages/@rescript/runtime/Belt_MutableSetInt.resi +++ b/packages/@rescript/runtime/Belt_MutableSetInt.resi @@ -100,12 +100,9 @@ let toList: t => list let toArray: t => array let minimum: t => option -let minUndefined: t => Js.undefined let maximum: t => option -let maxUndefined: t => Js.undefined let get: (t, value) => option -let getUndefined: (t, value) => Js.undefined let getExn: (t, value) => value let getOrThrow: (t, value) => value diff --git a/packages/@rescript/runtime/Belt_MutableSetString.res b/packages/@rescript/runtime/Belt_MutableSetString.res index 8e9129413d7..27557a4e28f 100644 --- a/packages/@rescript/runtime/Belt_MutableSetString.res +++ b/packages/@rescript/runtime/Belt_MutableSetString.res @@ -179,9 +179,7 @@ let make = () => {data: None} let isEmpty = d => N.isEmpty(d.data) let minimum = d => N.minimum(d.data) -let minUndefined = d => N.minUndefined(d.data) let maximum = d => N.maximum(d.data) -let maxUndefined = d => N.maxUndefined(d.data) let forEach = (d, f) => N.forEach(d.data, f) let reduce = (d, acc, cb) => N.reduce(d.data, acc, cb) let every = (d, p) => N.every(d.data, p) @@ -199,7 +197,6 @@ let fromArray = xs => {data: I.fromArray(xs)} let cmp = (d0, d1) => I.cmp(d0.data, d1.data) let eq = (d0, d1) => I.eq(d0.data, d1.data) let get = (d, x) => I.get(d.data, x) -let getUndefined = (d, x) => I.getUndefined(d.data, x) let getOrThrow = (d, x) => I.getOrThrow(d.data, x) let getExn = getOrThrow diff --git a/packages/@rescript/runtime/Belt_MutableSetString.resi b/packages/@rescript/runtime/Belt_MutableSetString.resi index 341385e2d43..94381f493ce 100644 --- a/packages/@rescript/runtime/Belt_MutableSetString.resi +++ b/packages/@rescript/runtime/Belt_MutableSetString.resi @@ -100,12 +100,9 @@ let toList: t => list let toArray: t => array let minimum: t => option -let minUndefined: t => Js.undefined let maximum: t => option -let maxUndefined: t => Js.undefined let get: (t, value) => option -let getUndefined: (t, value) => Js.undefined let getExn: (t, value) => value let getOrThrow: (t, value) => value diff --git a/packages/@rescript/runtime/Belt_MutableStack.res b/packages/@rescript/runtime/Belt_MutableStack.res index a9a3b815a05..7b5db2a48a7 100644 --- a/packages/@rescript/runtime/Belt_MutableStack.res +++ b/packages/@rescript/runtime/Belt_MutableStack.res @@ -19,12 +19,6 @@ let copy = (s: t<_>): t<_> => {root: s.root} let push = (s, x) => s.root = Some({head: x, tail: s.root}) -let topUndefined = (s: t<'a>) => - switch s.root { - | None => Js.undefined - | Some(x) => Js.Undefined.return(x.head) - } - let top = s => switch s.root { | None => None @@ -33,20 +27,20 @@ let top = s => let isEmpty = s => s.root == None -let popUndefined = s => +let pop = s => switch s.root { - | None => Js.undefined + | None => None | Some(x) => s.root = x.tail - Js.Undefined.return(x.head) + Some(x.head) } -let pop = s => +let popOrThrow = s => switch s.root { - | None => None + | None => throw(Not_found) | Some(x) => s.root = x.tail - Some(x.head) + x.head } let rec lengthAux = (x: cell<_>, acc) => diff --git a/packages/@rescript/runtime/Belt_MutableStack.resi b/packages/@rescript/runtime/Belt_MutableStack.resi index 7fbaae07ee4..33ba0017236 100644 --- a/packages/@rescript/runtime/Belt_MutableStack.resi +++ b/packages/@rescript/runtime/Belt_MutableStack.resi @@ -27,9 +27,8 @@ let clear: t<'a> => unit let copy: t<'a> => t<'a> let push: (t<'a>, 'a) => unit -let popUndefined: t<'a> => Js.undefined<'a> let pop: t<'a> => option<'a> -let topUndefined: t<'a> => Js.undefined<'a> +let popOrThrow: t<'a> => 'a let top: t<'a> => option<'a> let isEmpty: t<'a> => bool let size: t<'a> => int diff --git a/packages/@rescript/runtime/Belt_Set.res b/packages/@rescript/runtime/Belt_Set.res index 0ff9f314882..068e57b56f8 100644 --- a/packages/@rescript/runtime/Belt_Set.res +++ b/packages/@rescript/runtime/Belt_Set.res @@ -104,14 +104,10 @@ let toList = m => Dict.toList(m.data) let toArray = m => Dict.toArray(m.data) let minimum = m => Dict.minimum(m.data) -let minUndefined = m => Dict.minUndefined(m.data) let maximum = m => Dict.maximum(m.data) -let maxUndefined = m => Dict.maxUndefined(m.data) let get = (m, e) => Dict.get(~cmp=m.cmp, m.data, e) -let getUndefined = (m, e) => Dict.getUndefined(~cmp=m.cmp, m.data, e) - let getOrThrow = (m, e) => Dict.getOrThrow(~cmp=m.cmp, m.data, e) let getExn = getOrThrow diff --git a/packages/@rescript/runtime/Belt_Set.resi b/packages/@rescript/runtime/Belt_Set.resi index 352592f92c0..8d71784b8d4 100644 --- a/packages/@rescript/runtime/Belt_Set.resi +++ b/packages/@rescript/runtime/Belt_Set.resi @@ -568,26 +568,6 @@ s1->Belt.Set.minimum == Some(1) */ let minimum: t<'value, 'id> => option<'value> -/** -Returns minimum value of the collection. `undefined` if collection is empty. - -## Examples - -```rescript -module IntCmp = Belt.Id.MakeComparable({ - type t = int - let cmp = Pervasives.compare -}) - -let s0 = Belt.Set.make(~id=module(IntCmp)) -let s1 = Belt.Set.fromArray([3, 2, 1, 5], ~id=module(IntCmp)) - -s0->Belt.Set.minUndefined->Js.Undefined.toOption == None -s1->Belt.Set.minUndefined->Js.Undefined.toOption == Some(1) -``` -*/ -let minUndefined: t<'value, 'id> => Js.undefined<'value> - /** Returns maximum value of the collection. `None` if collection is empty. @@ -608,31 +588,6 @@ s1->Belt.Set.maximum == Some(5) */ let maximum: t<'value, 'id> => option<'value> -/** -Returns maximum value of the collection. `undefined` if collection is empty. - -## Examples - -```rescript -module IntCmp = Belt.Id.MakeComparable({ - type t = int - let cmp = Pervasives.compare -}) - -let s0 = Belt.Set.make(~id=module(IntCmp)) -let s1 = Belt.Set.fromArray([3, 2, 1, 5], ~id=module(IntCmp)) - -s0 -->Belt.Set.maxUndefined -->Js.Undefined.toOption == None - -s1 -->Belt.Set.maxUndefined -->Js.Undefined.toOption == Some(5) -``` -*/ -let maxUndefined: t<'value, 'id> => Js.undefined<'value> - /** Returns the reference of the value which is equivalent to value using the comparator specifiecd by this collection. Returns `None` if element does not exist. @@ -652,11 +607,6 @@ s0->Belt.Set.get(20) == None */ let get: (t<'value, 'id>, 'value) => option<'value> -/** -Same as [get](#get) but returns `undefined` when element does not exist. -*/ -let getUndefined: (t<'value, 'id>, 'value) => Js.undefined<'value> - /** Same as [get](#get) but throw when element does not exist. */ diff --git a/packages/@rescript/runtime/Belt_SetDict.res b/packages/@rescript/runtime/Belt_SetDict.res index c3ad5002c5b..a8879d903c0 100644 --- a/packages/@rescript/runtime/Belt_SetDict.res +++ b/packages/@rescript/runtime/Belt_SetDict.res @@ -230,12 +230,9 @@ let toList = N.toList let toArray = N.toArray let minimum = N.minimum let maximum = N.maximum -let maxUndefined = N.maxUndefined -let minUndefined = N.minUndefined let get = N.get let getOrThrow = N.getOrThrow let getExn = getOrThrow -let getUndefined = N.getUndefined let fromSortedArrayUnsafe = N.fromSortedArrayUnsafe let subset = N.subset diff --git a/packages/@rescript/runtime/Belt_SetDict.resi b/packages/@rescript/runtime/Belt_SetDict.resi index ce83362a7c7..c2a5354a6c7 100644 --- a/packages/@rescript/runtime/Belt_SetDict.resi +++ b/packages/@rescript/runtime/Belt_SetDict.resi @@ -499,26 +499,6 @@ s1->Belt.Set.Dict.minimum == Some(1) */ let minimum: t<'value, 'id> => option<'value> -/** -Returns minimum value of the collection. `undefined` if collection is empty. - -## Examples - -```rescript -module IntCmp = Belt.Id.MakeComparable({ - type t = int - let cmp = Pervasives.compare -}) - -let s0 = Belt.Set.Dict.empty -let s1 = Belt.Set.Dict.fromArray([3, 2, 1, 5], ~cmp=IntCmp.cmp) - -s0->Belt.Set.Dict.minUndefined == Js.undefined -s1->Belt.Set.Dict.minUndefined == Js.Undefined.return(1) -``` -*/ -let minUndefined: t<'value, 'id> => Js.undefined<'value> - /** Returns maximum value of the collection. `None` if collection is empty. @@ -539,26 +519,6 @@ s1->Belt.Set.Dict.maximum == Some(5) */ let maximum: t<'value, 'id> => option<'value> -/** -Returns maximum value of the collection. `undefined` if collection is empty. - -## Examples - -```rescript -module IntCmp = Belt.Id.MakeComparable({ - type t = int - let cmp = Pervasives.compare -}) - -let s0 = Belt.Set.Dict.empty -let s1 = Belt.Set.Dict.fromArray([3, 2, 1, 5], ~cmp=IntCmp.cmp) - -s0->Belt.Set.Dict.maxUndefined == Js.undefined -s1->Belt.Set.Dict.maxUndefined == Js.Undefined.return(5) -``` -*/ -let maxUndefined: t<'value, 'id> => Js.undefined<'value> - /** Returns the reference of the value which is equivalent to value using the comparator specifiecd by this collection. Returns `None` if element does not exist. @@ -579,11 +539,6 @@ s0->Belt.Set.Dict.get(20, ~cmp=IntCmp.cmp) == None */ let get: (t<'value, 'id>, 'value, ~cmp: cmp<'value, 'id>) => option<'value> -/** -Same as [get](#get) but returns `undefined` when element does not exist. -*/ -let getUndefined: (t<'value, 'id>, 'value, ~cmp: cmp<'value, 'id>) => Js.undefined<'value> - /** Same as [get](#get) but throw when element does not exist. */ diff --git a/packages/@rescript/runtime/Belt_SetInt.res b/packages/@rescript/runtime/Belt_SetInt.res index 238516c821a..c6c649c159d 100644 --- a/packages/@rescript/runtime/Belt_SetInt.res +++ b/packages/@rescript/runtime/Belt_SetInt.res @@ -9,9 +9,7 @@ type t = I.t let empty = None let isEmpty = N.isEmpty let minimum = N.minimum -let minUndefined = N.minUndefined let maximum = N.maximum -let maxUndefined = N.maxUndefined let forEach = N.forEach let reduce = N.reduce @@ -108,7 +106,6 @@ let fromArray = I.fromArray let cmp = I.cmp let eq = I.eq let get = I.get -let getUndefined = I.getUndefined let getOrThrow = I.getOrThrow let getExn = getOrThrow let subset = I.subset diff --git a/packages/@rescript/runtime/Belt_SetInt.resi b/packages/@rescript/runtime/Belt_SetInt.resi index 29d4fb5f839..590576256de 100644 --- a/packages/@rescript/runtime/Belt_SetInt.resi +++ b/packages/@rescript/runtime/Belt_SetInt.resi @@ -124,16 +124,10 @@ let toArray: t => array let minimum: t => option -let minUndefined: t => Js.undefined - let maximum: t => option -let maxUndefined: t => Js.undefined - let get: (t, value) => option -let getUndefined: (t, value) => Js.undefined - let getExn: (t, value) => value let getOrThrow: (t, value) => value diff --git a/packages/@rescript/runtime/Belt_SetString.res b/packages/@rescript/runtime/Belt_SetString.res index 7644cf724a5..c04c1fa0401 100644 --- a/packages/@rescript/runtime/Belt_SetString.res +++ b/packages/@rescript/runtime/Belt_SetString.res @@ -9,9 +9,7 @@ type t = I.t let empty = None let isEmpty = N.isEmpty let minimum = N.minimum -let minUndefined = N.minUndefined let maximum = N.maximum -let maxUndefined = N.maxUndefined let forEach = N.forEach let reduce = N.reduce @@ -108,7 +106,6 @@ let fromArray = I.fromArray let cmp = I.cmp let eq = I.eq let get = I.get -let getUndefined = I.getUndefined let getOrThrow = I.getOrThrow let getExn = getOrThrow let subset = I.subset diff --git a/packages/@rescript/runtime/Belt_SetString.resi b/packages/@rescript/runtime/Belt_SetString.resi index f6ab842f0c9..ec0f8cb375f 100644 --- a/packages/@rescript/runtime/Belt_SetString.resi +++ b/packages/@rescript/runtime/Belt_SetString.resi @@ -124,16 +124,10 @@ let toArray: t => array let minimum: t => option -let minUndefined: t => Js.undefined - let maximum: t => option -let maxUndefined: t => Js.undefined - let get: (t, value) => option -let getUndefined: (t, value) => Js.undefined - let getExn: (t, value) => value let getOrThrow: (t, value) => value diff --git a/packages/@rescript/runtime/Belt_internalAVLset.res b/packages/@rescript/runtime/Belt_internalAVLset.res index 0830ed6addc..1d11d4cda43 100644 --- a/packages/@rescript/runtime/Belt_internalAVLset.res +++ b/packages/@rescript/runtime/Belt_internalAVLset.res @@ -116,12 +116,6 @@ let minimum = n => | Some(n) => Some(min0Aux(n)) } -let minUndefined = n => - switch n { - | None => Js.undefined - | Some(n) => Js.Undefined.return(min0Aux(n)) - } - let rec max0Aux = n => switch n.right { | None => n.value @@ -134,12 +128,6 @@ let maximum = n => | Some(n) => Some(max0Aux(n)) } -let maxUndefined = n => - switch n { - | None => Js.undefined - | Some(n) => Js.Undefined.return(max0Aux(n)) - } - let rec removeMinAuxWithRef = (n, v) => switch n.left { | None => @@ -549,27 +537,6 @@ let rec get = (n: t<_>, x, ~cmp) => } } -let rec getUndefined = (n: t<_>, x, ~cmp) => - switch n { - | None => Js.Undefined.empty - | Some(t) /* Node(l, v, r, _) */ => - let v = t.value - let c = Belt_Id.getCmpInternal(cmp)(x, v) - if c == 0 { - Js.Undefined.return(v) - } else { - getUndefined( - ~cmp, - if c < 0 { - t.left - } else { - t.right - }, - x, - ) - } - } - let rec getOrThrow = (n: t<_>, x, ~cmp) => switch n { | None => throw(Not_found) diff --git a/packages/@rescript/runtime/Belt_internalAVLset.resi b/packages/@rescript/runtime/Belt_internalAVLset.resi index 5606c32da7a..3703c0f31ec 100644 --- a/packages/@rescript/runtime/Belt_internalAVLset.resi +++ b/packages/@rescript/runtime/Belt_internalAVLset.resi @@ -25,9 +25,7 @@ let bal: (t<'a>, 'a, t<'a>) => t<'a> let singleton: 'a => t<'a> let minimum: t<'a> => option<'a> -let minUndefined: t<'a> => Js.undefined<'a> let maximum: t<'a> => option<'a> -let maxUndefined: t<'a> => Js.undefined<'a> let removeMinAuxWithRef: (node<'a>, ref<'a>) => t<'a> /* `removeMinAuxWithRef n cell` return a new node with @@ -76,7 +74,6 @@ let cmp: (t<'a>, t<'a>, ~cmp: cmp<'a, 'b>) => int let eq: (t<'a>, t<'a>, ~cmp: cmp<'a, 'b>) => bool let subset: (t<'a>, t<'a>, ~cmp: cmp<'a, 'b>) => bool let get: (t<'a>, 'a, ~cmp: cmp<'a, 'b>) => option<'a> -let getUndefined: (t<'a>, 'a, ~cmp: cmp<'a, 'b>) => Js.undefined<'a> let getOrThrow: (t<'a>, 'a, ~cmp: cmp<'a, 'b>) => 'a let fromArray: (array<'a>, ~cmp: cmp<'a, 'b>) => t<'a> diff --git a/packages/@rescript/runtime/Belt_internalAVLtree.res b/packages/@rescript/runtime/Belt_internalAVLtree.res index 5bd2b63ef8d..80f3ded37c1 100644 --- a/packages/@rescript/runtime/Belt_internalAVLtree.res +++ b/packages/@rescript/runtime/Belt_internalAVLtree.res @@ -134,12 +134,6 @@ let minKey = n => | Some(n) => Some(minKey0Aux(n)) } -let minKeyUndefined = n => - switch n { - | None => Js.undefined - | Some(n) => Js.Undefined.return(minKey0Aux(n)) - } - let rec maxKey0Aux = n => switch n.right { | None => n.key @@ -152,12 +146,6 @@ let maxKey = n => | Some(n) => Some(maxKey0Aux(n)) } -let maxKeyUndefined = n => - switch n { - | None => Js.undefined - | Some(n) => Js.Undefined.return(maxKey0Aux(n)) - } - let rec minKV0Aux = n => switch n.left { | None => (n.key, n.value) @@ -170,12 +158,6 @@ let minimum = n => | Some(n) => Some(minKV0Aux(n)) } -let minUndefined = n => - switch n { - | None => Js.undefined - | Some(n) => Js.Undefined.return(minKV0Aux(n)) - } - let rec maxKV0Aux = n => switch n.right { | None => (n.key, n.value) @@ -188,12 +170,6 @@ let maximum = n => | Some(n) => Some(maxKV0Aux(n)) } -let maxUndefined = n => - switch n { - | None => Js.undefined - | Some(n) => Js.Undefined.return(maxKV0Aux(n)) - } - /* TODO: use kv ref */ let rec removeMinAuxWithRef = (n, kr, vr) => switch n.left { @@ -683,27 +659,6 @@ let rec get = (n, x, ~cmp) => } } -let rec getUndefined = (n, x, ~cmp) => - switch n { - | None => Js.undefined - | Some(n) => - let v = n.key - let c = Belt_Id.getCmpInternal(cmp)(x, v) - if c == 0 { - Js.Undefined.return(n.value) - } else { - getUndefined( - ~cmp, - if c < 0 { - n.left - } else { - n.right - }, - x, - ) - } - } - let rec getOrThrow = (n, x, ~cmp) => switch n { | None => throw(Not_found) diff --git a/packages/@rescript/runtime/Belt_internalAVLtree.resi b/packages/@rescript/runtime/Belt_internalAVLtree.resi index 614ff1fd7d2..c204c8db792 100644 --- a/packages/@rescript/runtime/Belt_internalAVLtree.resi +++ b/packages/@rescript/runtime/Belt_internalAVLtree.resi @@ -25,16 +25,12 @@ let singleton: ('a, 'b) => t<'a, 'b> let updateValue: (node<'k, 'v>, 'v) => node<'k, 'v> let minKey: t<'a, 'b> => option<'a> -let minKeyUndefined: t<'a, 'b> => Js.undefined<'a> let maxKey: t<'a, 'b> => option<'a> -let maxKeyUndefined: t<'a, 'b> => Js.undefined<'a> let minimum: t<'a, 'b> => option<('a, 'b)> -let minUndefined: t<'a, 'b> => Js.undefined<('a, 'b)> let maximum: t<'a, 'b> => option<('a, 'b)> -let maxUndefined: t<'a, 'b> => Js.undefined<('a, 'b)> let removeMinAuxWithRef: (node<'a, 'b>, ref<'a>, ref<'b>) => t<'a, 'b> @@ -93,8 +89,6 @@ let eq: (t<'a, 'b>, t<'a, 'c>, ~kcmp: cmp<'a, _>, ~veq: ('b, 'c) => bool) => boo let get: (t<'a, 'b>, 'a, ~cmp: cmp<'a, _>) => option<'b> -let getUndefined: (t<'a, 'b>, 'a, ~cmp: cmp<'a, _>) => Js.undefined<'b> - let getWithDefault: (t<'a, 'b>, 'a, 'b, ~cmp: cmp<'a, _>) => 'b let getOrThrow: (t<'a, 'b>, 'a, ~cmp: cmp<'a, _>) => 'b diff --git a/packages/@rescript/runtime/Belt_internalMapInt.res b/packages/@rescript/runtime/Belt_internalMapInt.res index 8a750ca393c..ae1ce3a6314 100644 --- a/packages/@rescript/runtime/Belt_internalMapInt.res +++ b/packages/@rescript/runtime/Belt_internalMapInt.res @@ -44,25 +44,6 @@ let rec get = (n, x: key) => } } -let rec getUndefined = (n, x: key) => - switch n { - | None => Js.undefined - | Some(n) => - let v = n.N.key - if x == v { - Js.Undefined.return(n.N.value) - } else { - getUndefined( - if x < v { - n.N.left - } else { - n.N.right - }, - x, - ) - } - } - let rec getOrThrow = (n, x: key) => switch n { | None => throw(Not_found) diff --git a/packages/@rescript/runtime/Belt_internalMapString.res b/packages/@rescript/runtime/Belt_internalMapString.res index 000acdb1473..9426d076f4f 100644 --- a/packages/@rescript/runtime/Belt_internalMapString.res +++ b/packages/@rescript/runtime/Belt_internalMapString.res @@ -44,25 +44,6 @@ let rec get = (n, x: key) => } } -let rec getUndefined = (n, x: key) => - switch n { - | None => Js.undefined - | Some(n) => - let v = n.N.key - if x == v { - Js.Undefined.return(n.N.value) - } else { - getUndefined( - if x < v { - n.N.left - } else { - n.N.right - }, - x, - ) - } - } - let rec getOrThrow = (n, x: key) => switch n { | None => throw(Not_found) diff --git a/packages/@rescript/runtime/Belt_internalSetInt.res b/packages/@rescript/runtime/Belt_internalSetInt.res index c756d09d5aa..55029c22473 100644 --- a/packages/@rescript/runtime/Belt_internalSetInt.res +++ b/packages/@rescript/runtime/Belt_internalSetInt.res @@ -85,25 +85,6 @@ let rec get = (n: t, x: value) => } } -let rec getUndefined = (n: t, x: value) => - switch n { - | None => Js.undefined - | Some(t) => - let v = t.value - if x == v { - Js.Undefined.return(v) - } else { - getUndefined( - if x < v { - t.left - } else { - t.right - }, - x, - ) - } - } - let rec getOrThrow = (n: t, x: value) => switch n { | None => throw(Not_found) diff --git a/packages/@rescript/runtime/Belt_internalSetString.res b/packages/@rescript/runtime/Belt_internalSetString.res index bff62d16894..910a1d0aaf9 100644 --- a/packages/@rescript/runtime/Belt_internalSetString.res +++ b/packages/@rescript/runtime/Belt_internalSetString.res @@ -85,25 +85,6 @@ let rec get = (n: t, x: value) => } } -let rec getUndefined = (n: t, x: value) => - switch n { - | None => Js.undefined - | Some(t) => - let v = t.value - if x == v { - Js.Undefined.return(v) - } else { - getUndefined( - if x < v { - t.left - } else { - t.right - }, - x, - ) - } - } - let rec getOrThrow = (n: t, x: value) => switch n { | None => throw(Not_found) diff --git a/packages/@rescript/runtime/cppo/belt_Set.res.cppo b/packages/@rescript/runtime/cppo/belt_Set.res.cppo index 9b649f81800..ed78783e808 100644 --- a/packages/@rescript/runtime/cppo/belt_Set.res.cppo +++ b/packages/@rescript/runtime/cppo/belt_Set.res.cppo @@ -15,9 +15,7 @@ type t = I.t let empty = None let isEmpty = N.isEmpty let minimum = N.minimum -let minUndefined = N.minUndefined let maximum = N.maximum -let maxUndefined = N.maxUndefined let forEach = N.forEach let reduce = N.reduce @@ -114,8 +112,8 @@ let fromArray = I.fromArray let cmp = I.cmp let eq = I.eq let get = I.get -let getUndefined = I.getUndefined -let getExn = I.getExn +let getOrThrow = I.getOrThrow +let getExn = getOrThrow let subset = I.subset let has = I.has diff --git a/packages/@rescript/runtime/cppo/belt_Set.resi.cppo b/packages/@rescript/runtime/cppo/belt_Set.resi.cppo index 7765a32daf5..aa18d2f94c1 100644 --- a/packages/@rescript/runtime/cppo/belt_Set.resi.cppo +++ b/packages/@rescript/runtime/cppo/belt_Set.resi.cppo @@ -1,26 +1,8 @@ -/* Copyright (C) 2017 Authors of ReScript +/* Copyright (C) 2015-2016 Bloomberg Finance L.P. + * Copyright (C) 2017- Hongbo Zhang, Authors of ReScript * - * 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. */ + * SPDX-License-Identifier: MIT + */ /*** This module is [`Belt.Set`]() specialized with value type to be a primitive type. @@ -149,18 +131,14 @@ let toArray: t => array let minimum: t => option -let minUndefined: t => Js.undefined - let maximum: t => option -let maxUndefined: t => Js.undefined - let get: (t, value) => option -let getUndefined: (t, value) => Js.undefined - let getExn: (t, value) => value +let getOrThrow: (t, value) => value + /** `split(x, s)` returns a triple `(l, present, r)`, where `l` is the set of elements of `s` that are strictly less than `x`;`r` is the set of elements of diff --git a/packages/@rescript/runtime/cppo/hashmap.res.cppo b/packages/@rescript/runtime/cppo/hashmap.res.cppo index 4e07f9c5709..931e8fddbac 100644 --- a/packages/@rescript/runtime/cppo/hashmap.res.cppo +++ b/packages/@rescript/runtime/cppo/hashmap.res.cppo @@ -1,15 +1,8 @@ -/* ********************************************************************* */ -/* */ -/* OCaml */ -/* */ -/* Xavier Leroy, projet Cristal, INRIA Rocquencourt */ -/* */ -/* Copyright 1996 Institut National de Recherche en Informatique et */ -/* en Automatique. All rights reserved. This file is distributed */ -/* under the terms of the GNU Library General Public License, with */ -/* the special exception on linking described in file ../LICENSE. */ -/* */ -/* ********************************************************************* */ +/* Copyright (C) 2015-2016 Bloomberg Finance L.P. + * Copyright (C) 2017- Hongbo Zhang, Authors of ReScript + * + * SPDX-License-Identifier: MIT + */ /* Adapted by Hongbo Zhang, Authors of ReScript 2017 */ diff --git a/packages/@rescript/runtime/cppo/hashset.resi.cppo b/packages/@rescript/runtime/cppo/hashset.resi.cppo index 6b2b8423820..cb6db42827e 100644 --- a/packages/@rescript/runtime/cppo/hashset.resi.cppo +++ b/packages/@rescript/runtime/cppo/hashset.resi.cppo @@ -1,26 +1,8 @@ -/* Copyright (C) 2017 Authors of ReScript +/* Copyright (C) 2015-2016 Bloomberg Finance L.P. + * Copyright (C) 2017- Hongbo Zhang, Authors of ReScript * - * 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. */ + * SPDX-License-Identifier: MIT + */ /*** This module is [`Belt.HashSet`]() specialized with key type to be a primitive type. diff --git a/packages/@rescript/runtime/cppo/internal_map.res.cppo b/packages/@rescript/runtime/cppo/internal_map.res.cppo index 6e44c22850f..c0ed3e0c6e5 100644 --- a/packages/@rescript/runtime/cppo/internal_map.res.cppo +++ b/packages/@rescript/runtime/cppo/internal_map.res.cppo @@ -50,26 +50,7 @@ let rec get = (n, x: key) => } } -let rec getUndefined = (n, x: key) => - switch n { - | None => Js.undefined - | Some(n) => - let v = n.N.key - if x == v { - Js.Undefined.return(n.N.value) - } else { - getUndefined( - if x < v { - n.N.left - } else { - n.N.right - }, - x, - ) - } - } - -let rec getExn = (n, x: key) => +let rec getOrThrow = (n, x: key) => switch n { | None => throw(Not_found) | Some(n) => @@ -77,7 +58,7 @@ let rec getExn = (n, x: key) => if x == v { n.N.value } else { - getExn( + getOrThrow( if x < v { n.N.left } else { diff --git a/packages/@rescript/runtime/cppo/internal_set.res.cppo b/packages/@rescript/runtime/cppo/internal_set.res.cppo index e517b7da658..3a5738af434 100644 --- a/packages/@rescript/runtime/cppo/internal_set.res.cppo +++ b/packages/@rescript/runtime/cppo/internal_set.res.cppo @@ -92,26 +92,7 @@ let rec get = (n: t, x: value) => } } -let rec getUndefined = (n: t, x: value) => - switch n { - | None => Js.undefined - | Some(t) => - let v = t.value - if x == v { - Js.Undefined.return(v) - } else { - getUndefined( - if x < v { - t.left - } else { - t.right - }, - x, - ) - } - } - -let rec getExn = (n: t, x: value) => +let rec getOrThrow = (n: t, x: value) => switch n { | None => throw(Not_found) | Some(t) => @@ -119,7 +100,7 @@ let rec getExn = (n: t, x: value) => if x == v { v } else { - getExn( + getOrThrow( if x < v { t.left } else { diff --git a/packages/@rescript/runtime/cppo/map.res.cppo b/packages/@rescript/runtime/cppo/map.res.cppo index 6dbae0188b3..6f0d95d8771 100644 --- a/packages/@rescript/runtime/cppo/map.res.cppo +++ b/packages/@rescript/runtime/cppo/map.res.cppo @@ -18,13 +18,9 @@ let isEmpty = N.isEmpty /* let singleton = N.singleton */ let minKey = N.minKey -let minKeyUndefined = N.minKeyUndefined let maxKey = N.maxKey -let maxKeyUndefined = N.maxKeyUndefined let minimum = N.minimum -let minUndefined = N.minUndefined let maximum = N.maximum -let maxUndefined = N.maxUndefined let findFirstBy = N.findFirstBy let forEach = N.forEach let map = N.map @@ -176,9 +172,9 @@ let has = I.has let cmp = I.cmp let eq = I.eq let get = I.get -let getUndefined = I.getUndefined let getWithDefault = I.getWithDefault -let getExn = I.getExn +let getOrThrow = I.getOrThrow +let getExn = getOrThrow let split = I.split let merge = I.merge let fromArray = I.fromArray diff --git a/packages/@rescript/runtime/cppo/map.resi.cppo b/packages/@rescript/runtime/cppo/map.resi.cppo index f339f2b7243..2a0d3a80d05 100644 --- a/packages/@rescript/runtime/cppo/map.resi.cppo +++ b/packages/@rescript/runtime/cppo/map.resi.cppo @@ -42,15 +42,11 @@ to match predicate `p`. #ifdef TYPE_STRING let mapString = Belt.Map.String.fromArray([("1", "one"), ("2", "two"), ("3", "three")]) -mapString-> -Belt.Map.String.findFirstBy((k, v) => k == "1" && v == "one") -->assertEqual(Some("1", "one")) +mapString->Belt.Map.String.findFirstBy((k, v) => k == "1" && v == "one") == Some("1", "one") #elif defined TYPE_INT let mapInt = Belt.Map.Int.fromArray([(1, "one"), (2, "two"), (3, "three")]) -mapInt-> -Belt.Map.Int.findFirstBy((k, v) => k == 1 && v == "one") -->assertEqual(Some(1, "one")) +mapInt->Belt.Map.Int.findFirstBy((k, v) => k == 1 && v == "one") == Some(1, "one") #else [%error "unknown type"] #endif @@ -110,28 +106,20 @@ let valuesToArray: t<'v> => array<'v> let minKey: t<_> => option -let minKeyUndefined: t<_> => Js.undefined - let maxKey: t<_> => option -let maxKeyUndefined: t<_> => Js.undefined - let minimum: t<'v> => option<(key, 'v)> -let minUndefined: t<'v> => Js.undefined<(key, 'v)> - let maximum: t<'v> => option<(key, 'v)> -let maxUndefined: t<'v> => Js.undefined<(key, 'v)> - let get: (t<'v>, key) => option<'v> -let getUndefined: (t<'v>, key) => Js.undefined<'v> - let getWithDefault: (t<'v>, key, 'v) => 'v let getExn: (t<'v>, key) => 'v +let getOrThrow: (t<'v>, key) => 'v + /** **throw** when invariant is not held */ diff --git a/packages/@rescript/runtime/cppo/mapm.res.cppo b/packages/@rescript/runtime/cppo/mapm.res.cppo index 4820a22f851..47229cbf0d9 100644 --- a/packages/@rescript/runtime/cppo/mapm.res.cppo +++ b/packages/@rescript/runtime/cppo/mapm.res.cppo @@ -18,14 +18,10 @@ let isEmpty = m => N.isEmpty(m.data) let clear = m => m.data = None /* let singleton k v = t ~data:(N.singleton k v) */ -let minKeyUndefined = m => N.minKeyUndefined(m.data) let minKey = m => N.minKey(m.data) -let maxKeyUndefined = m => N.maxKeyUndefined(m.data) let maxKey = m => N.maxKey(m.data) let minimum = m => N.minimum(m.data) -let minUndefined = m => N.minUndefined(m.data) let maximum = m => N.maximum(m.data) -let maxUndefined = m => N.maxUndefined(m.data) let set = (m: t<_>, k, v) => { let old_data = m.data @@ -170,9 +166,9 @@ let cmp = (d0, d1, f) => I.cmp(d0.data, d1.data, f) let eq = (d0, d1, f) => I.eq(d0.data, d1.data, f) let get = (d, x) => I.get(d.data, x) -let getUndefined = (d, x) => I.getUndefined(d.data, x) let getWithDefault = (d, x, def) => I.getWithDefault(d.data, x, def) -let getExn = (d, x) => I.getExn(d.data, x) +let getOrThrow = (d, x) => I.getOrThrow(d.data, x) +let getExn = getOrThrow let cmpU = cmp let eqU = eq diff --git a/packages/@rescript/runtime/cppo/mapm.resi.cppo b/packages/@rescript/runtime/cppo/mapm.resi.cppo index 7046a3ddfba..83f296c2bc4 100644 --- a/packages/@rescript/runtime/cppo/mapm.resi.cppo +++ b/packages/@rescript/runtime/cppo/mapm.resi.cppo @@ -1,26 +1,8 @@ -/* Copyright (C) 2017 Authors of ReScript +/* Copyright (C) 2015-2016 Bloomberg Finance L.P. + * Copyright (C) 2017- Hongbo Zhang, Authors of ReScript * - * 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. */ + * SPDX-License-Identifier: MIT + */ #ifdef TYPE_STRING type key = string @@ -101,20 +83,20 @@ let fromArray: array<(key, 'a)> => t<'a> let keysToArray: t<'a> => array let valuesToArray: t<'a> => array<'a> let minKey: t<_> => option -let minKeyUndefined: t<_> => Js.undefined let maxKey: t<_> => option -let maxKeyUndefined: t<_> => Js.undefined let minimum: t<'a> => option<(key, 'a)> -let minUndefined: t<'a> => Js.undefined<(key, 'a)> let maximum: t<'a> => option<(key, 'a)> -let maxUndefined: t<'a> => Js.undefined<(key, 'a)> let get: (t<'a>, key) => option<'a> -let getUndefined: (t<'a>, key) => Js.undefined<'a> let getWithDefault: (t<'a>, key, 'a) => 'a let getExn: (t<'a>, key) => 'a +let getOrThrow: (t<'a>, key) => 'a /** +#ifdef TYPE_STRING **throw** when invariant is not held +#else + **Throw** when invariant is not held +#endif */ let checkInvariantInternal: t<_> => unit diff --git a/packages/@rescript/runtime/cppo/setm.res.cppo b/packages/@rescript/runtime/cppo/setm.res.cppo index f98067938e1..6c8070f0bb6 100644 --- a/packages/@rescript/runtime/cppo/setm.res.cppo +++ b/packages/@rescript/runtime/cppo/setm.res.cppo @@ -1,26 +1,8 @@ -/* Copyright (C) 2017 Hongbo Zhang, Authors of ReScript +/* Copyright (C) 2015-2016 Bloomberg Finance L.P. + * Copyright (C) 2017- Hongbo Zhang, Authors of ReScript * - * 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. */ + * SPDX-License-Identifier: MIT + */ /*** This module is [`Belt.MutableSet`]() specialized with key type to be a primitive type. It is more efficient in general, the API is the same with [`Belt_MutableSet`]() except its key type is fixed, @@ -204,9 +186,7 @@ let make = () => {data: None} let isEmpty = d => N.isEmpty(d.data) let minimum = d => N.minimum(d.data) -let minUndefined = d => N.minUndefined(d.data) let maximum = d => N.maximum(d.data) -let maxUndefined = d => N.maxUndefined(d.data) let forEach = (d, f) => N.forEach(d.data, f) let reduce = (d, acc, cb) => N.reduce(d.data, acc, cb) let every = (d, p) => N.every(d.data, p) @@ -224,8 +204,8 @@ let fromArray = xs => {data: I.fromArray(xs)} let cmp = (d0, d1) => I.cmp(d0.data, d1.data) let eq = (d0, d1) => I.eq(d0.data, d1.data) let get = (d, x) => I.get(d.data, x) -let getUndefined = (d, x) => I.getUndefined(d.data, x) -let getExn = (d, x) => I.getExn(d.data, x) +let getOrThrow = (d, x) => I.getOrThrow(d.data, x) +let getExn = getOrThrow let split = (d, key) => { let arr = N.toArray(d.data) diff --git a/packages/@rescript/runtime/cppo/setm.resi.cppo b/packages/@rescript/runtime/cppo/setm.resi.cppo index 8e9611b8802..d2eb67f0969 100644 --- a/packages/@rescript/runtime/cppo/setm.resi.cppo +++ b/packages/@rescript/runtime/cppo/setm.resi.cppo @@ -1,26 +1,8 @@ -/* Copyright (C) 2017 Authors of ReScript +/* Copyright (C) 2015-2016 Bloomberg Finance L.P. + * Copyright (C) 2017- Hongbo Zhang, Authors of ReScript * - * 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. */ + * SPDX-License-Identifier: MIT + */ /*** This module is [`Belt.MutableSet`]() specialized with key type to be a primitive type. @@ -125,13 +107,11 @@ let toList: t => list let toArray: t => array let minimum: t => option -let minUndefined: t => Js.undefined let maximum: t => option -let maxUndefined: t => Js.undefined let get: (t, value) => option -let getUndefined: (t, value) => Js.undefined let getExn: (t, value) => value +let getOrThrow: (t, value) => value /** `split(s, key)` return a fresh copy of each diff --git a/packages/@rescript/runtime/cppo/sort.resi.cppo b/packages/@rescript/runtime/cppo/sort.resi.cppo index 8570da496fd..ad2015a4ee7 100644 --- a/packages/@rescript/runtime/cppo/sort.resi.cppo +++ b/packages/@rescript/runtime/cppo/sort.resi.cppo @@ -1,26 +1,8 @@ -/* Copyright (C) 2017 Authors of ReScript +/* Copyright (C) 2015-2016 Bloomberg Finance L.P. + * Copyright (C) 2017- Hongbo Zhang, Authors of ReScript * - * 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. */ + * SPDX-License-Identifier: MIT + */ /*** This is a specialized module for [`Belt_SortArray`](), the docs in that module also diff --git a/packages/@rescript/runtime/lib/es6/Belt_Array.mjs b/packages/@rescript/runtime/lib/es6/Belt_Array.mjs index 8b7ff062d66..f693ae6d07b 100644 --- a/packages/@rescript/runtime/lib/es6/Belt_Array.mjs +++ b/packages/@rescript/runtime/lib/es6/Belt_Array.mjs @@ -15,7 +15,7 @@ function getOrThrow(arr, i) { RE_EXN_ID: "Assert_failure", _1: [ "Belt_Array.res", - 29, + 27, 2 ], Error: new Error() @@ -39,7 +39,7 @@ function setOrThrow(arr, i, v) { RE_EXN_ID: "Assert_failure", _1: [ "Belt_Array.res", - 44, + 42, 2 ], Error: new Error() diff --git a/packages/@rescript/runtime/lib/es6/Belt_Map.mjs b/packages/@rescript/runtime/lib/es6/Belt_Map.mjs index 4b499632dd4..037146cdf67 100644 --- a/packages/@rescript/runtime/lib/es6/Belt_Map.mjs +++ b/packages/@rescript/runtime/lib/es6/Belt_Map.mjs @@ -175,42 +175,22 @@ function minKey(m) { return Belt_MapDict.minKey(m.data); } -function minKeyUndefined(m) { - return Belt_MapDict.minKeyUndefined(m.data); -} - function maxKey(m) { return Belt_MapDict.maxKey(m.data); } -function maxKeyUndefined(m) { - return Belt_MapDict.maxKeyUndefined(m.data); -} - function minimum(m) { return Belt_MapDict.minimum(m.data); } -function minUndefined(m) { - return Belt_MapDict.minUndefined(m.data); -} - function maximum(m) { return Belt_MapDict.maximum(m.data); } -function maxUndefined(m) { - return Belt_MapDict.maxUndefined(m.data); -} - function get(map, x) { return Belt_MapDict.get(map.data, x, map.cmp); } -function getUndefined(map, x) { - return Belt_MapDict.getUndefined(map.data, x, map.cmp); -} - function getWithDefault(map, x, def) { return Belt_MapDict.getWithDefault(map.data, x, def, map.cmp); } @@ -315,15 +295,10 @@ export { keysToArray, valuesToArray, minKey, - minKeyUndefined, maxKey, - maxKeyUndefined, minimum, - minUndefined, maximum, - maxUndefined, get, - getUndefined, getWithDefault, getExn, getOrThrow, diff --git a/packages/@rescript/runtime/lib/es6/Belt_MapDict.mjs b/packages/@rescript/runtime/lib/es6/Belt_MapDict.mjs index 6458d3fe30c..cd6869b361e 100644 --- a/packages/@rescript/runtime/lib/es6/Belt_MapDict.mjs +++ b/packages/@rescript/runtime/lib/es6/Belt_MapDict.mjs @@ -304,24 +304,14 @@ let valuesToArray = Belt_internalAVLtree.valuesToArray; let minKey = Belt_internalAVLtree.minKey; -let minKeyUndefined = Belt_internalAVLtree.minKeyUndefined; - let maxKey = Belt_internalAVLtree.maxKey; -let maxKeyUndefined = Belt_internalAVLtree.maxKeyUndefined; - let minimum = Belt_internalAVLtree.minimum; -let minUndefined = Belt_internalAVLtree.minUndefined; - let maximum = Belt_internalAVLtree.maximum; -let maxUndefined = Belt_internalAVLtree.maxUndefined; - let get = Belt_internalAVLtree.get; -let getUndefined = Belt_internalAVLtree.getUndefined; - let getWithDefault = Belt_internalAVLtree.getWithDefault; let getExn = Belt_internalAVLtree.getOrThrow; @@ -375,15 +365,10 @@ export { keysToArray, valuesToArray, minKey, - minKeyUndefined, maxKey, - maxKeyUndefined, minimum, - minUndefined, maximum, - maxUndefined, get, - getUndefined, getWithDefault, getExn, getOrThrow, diff --git a/packages/@rescript/runtime/lib/es6/Belt_MapInt.mjs b/packages/@rescript/runtime/lib/es6/Belt_MapInt.mjs index 9e7fdb69017..15535ae39c4 100644 --- a/packages/@rescript/runtime/lib/es6/Belt_MapInt.mjs +++ b/packages/@rescript/runtime/lib/es6/Belt_MapInt.mjs @@ -196,24 +196,14 @@ let valuesToArray = Belt_internalAVLtree.valuesToArray; let minKey = Belt_internalAVLtree.minKey; -let minKeyUndefined = Belt_internalAVLtree.minKeyUndefined; - let maxKey = Belt_internalAVLtree.maxKey; -let maxKeyUndefined = Belt_internalAVLtree.maxKeyUndefined; - let minimum = Belt_internalAVLtree.minimum; -let minUndefined = Belt_internalAVLtree.minUndefined; - let maximum = Belt_internalAVLtree.maximum; -let maxUndefined = Belt_internalAVLtree.maxUndefined; - let get = Belt_internalMapInt.get; -let getUndefined = Belt_internalMapInt.getUndefined; - let getWithDefault = Belt_internalMapInt.getWithDefault; let getExn = Belt_internalMapInt.getOrThrow; @@ -271,15 +261,10 @@ export { keysToArray, valuesToArray, minKey, - minKeyUndefined, maxKey, - maxKeyUndefined, minimum, - minUndefined, maximum, - maxUndefined, get, - getUndefined, getWithDefault, getExn, getOrThrow, diff --git a/packages/@rescript/runtime/lib/es6/Belt_MapString.mjs b/packages/@rescript/runtime/lib/es6/Belt_MapString.mjs index 07ea088642e..4eccd3c5a21 100644 --- a/packages/@rescript/runtime/lib/es6/Belt_MapString.mjs +++ b/packages/@rescript/runtime/lib/es6/Belt_MapString.mjs @@ -196,24 +196,14 @@ let valuesToArray = Belt_internalAVLtree.valuesToArray; let minKey = Belt_internalAVLtree.minKey; -let minKeyUndefined = Belt_internalAVLtree.minKeyUndefined; - let maxKey = Belt_internalAVLtree.maxKey; -let maxKeyUndefined = Belt_internalAVLtree.maxKeyUndefined; - let minimum = Belt_internalAVLtree.minimum; -let minUndefined = Belt_internalAVLtree.minUndefined; - let maximum = Belt_internalAVLtree.maximum; -let maxUndefined = Belt_internalAVLtree.maxUndefined; - let get = Belt_internalMapString.get; -let getUndefined = Belt_internalMapString.getUndefined; - let getWithDefault = Belt_internalMapString.getWithDefault; let getExn = Belt_internalMapString.getOrThrow; @@ -271,15 +261,10 @@ export { keysToArray, valuesToArray, minKey, - minKeyUndefined, maxKey, - maxKeyUndefined, minimum, - minUndefined, maximum, - maxUndefined, get, - getUndefined, getWithDefault, getExn, getOrThrow, diff --git a/packages/@rescript/runtime/lib/es6/Belt_MutableMap.mjs b/packages/@rescript/runtime/lib/es6/Belt_MutableMap.mjs index 18c824ed5dd..6904df72a89 100644 --- a/packages/@rescript/runtime/lib/es6/Belt_MutableMap.mjs +++ b/packages/@rescript/runtime/lib/es6/Belt_MutableMap.mjs @@ -152,34 +152,18 @@ function minKey(m) { return Belt_internalAVLtree.minKey(m.data); } -function minKeyUndefined(m) { - return Belt_internalAVLtree.minKeyUndefined(m.data); -} - function maxKey(m) { return Belt_internalAVLtree.maxKey(m.data); } -function maxKeyUndefined(m) { - return Belt_internalAVLtree.maxKeyUndefined(m.data); -} - function minimum(m) { return Belt_internalAVLtree.minimum(m.data); } -function minUndefined(m) { - return Belt_internalAVLtree.minUndefined(m.data); -} - function maximum(m) { return Belt_internalAVLtree.maximum(m.data); } -function maxUndefined(m) { - return Belt_internalAVLtree.maxUndefined(m.data); -} - function forEach(d, f) { Belt_internalAVLtree.forEach(d.data, f); } @@ -246,10 +230,6 @@ function get(m, x) { return Belt_internalAVLtree.get(m.data, x, m.cmp); } -function getUndefined(m, x) { - return Belt_internalAVLtree.getUndefined(m.data, x, m.cmp); -} - function getWithDefault(m, x, def) { return Belt_internalAVLtree.getWithDefault(m.data, x, def, m.cmp); } @@ -347,15 +327,10 @@ export { keysToArray, valuesToArray, minKey, - minKeyUndefined, maxKey, - maxKeyUndefined, minimum, - minUndefined, maximum, - maxUndefined, get, - getUndefined, getWithDefault, getExn, getOrThrow, diff --git a/packages/@rescript/runtime/lib/es6/Belt_MutableMapInt.mjs b/packages/@rescript/runtime/lib/es6/Belt_MutableMapInt.mjs index 193f22c86b2..c7a5111a0f8 100644 --- a/packages/@rescript/runtime/lib/es6/Belt_MutableMapInt.mjs +++ b/packages/@rescript/runtime/lib/es6/Belt_MutableMapInt.mjs @@ -19,18 +19,10 @@ function clear(m) { m.data = undefined; } -function minKeyUndefined(m) { - return Belt_internalAVLtree.minKeyUndefined(m.data); -} - function minKey(m) { return Belt_internalAVLtree.minKey(m.data); } -function maxKeyUndefined(m) { - return Belt_internalAVLtree.maxKeyUndefined(m.data); -} - function maxKey(m) { return Belt_internalAVLtree.maxKey(m.data); } @@ -39,18 +31,10 @@ function minimum(m) { return Belt_internalAVLtree.minimum(m.data); } -function minUndefined(m) { - return Belt_internalAVLtree.minUndefined(m.data); -} - function maximum(m) { return Belt_internalAVLtree.maximum(m.data); } -function maxUndefined(m) { - return Belt_internalAVLtree.maxUndefined(m.data); -} - function set(m, k, v) { let old_data = m.data; let v$1 = Belt_internalMapInt.addMutate(old_data, k, v); @@ -260,10 +244,6 @@ function get(d, x) { return Belt_internalMapInt.get(d.data, x); } -function getUndefined(d, x) { - return Belt_internalMapInt.getUndefined(d.data, x); -} - function getWithDefault(d, x, def) { return Belt_internalMapInt.getWithDefault(d.data, x, def); } @@ -316,15 +296,10 @@ export { keysToArray, valuesToArray, minKey, - minKeyUndefined, maxKey, - maxKeyUndefined, minimum, - minUndefined, maximum, - maxUndefined, get, - getUndefined, getWithDefault, getExn, getOrThrow, diff --git a/packages/@rescript/runtime/lib/es6/Belt_MutableMapString.mjs b/packages/@rescript/runtime/lib/es6/Belt_MutableMapString.mjs index 55d6ff1ab9e..12c23b010ba 100644 --- a/packages/@rescript/runtime/lib/es6/Belt_MutableMapString.mjs +++ b/packages/@rescript/runtime/lib/es6/Belt_MutableMapString.mjs @@ -19,18 +19,10 @@ function clear(m) { m.data = undefined; } -function minKeyUndefined(m) { - return Belt_internalAVLtree.minKeyUndefined(m.data); -} - function minKey(m) { return Belt_internalAVLtree.minKey(m.data); } -function maxKeyUndefined(m) { - return Belt_internalAVLtree.maxKeyUndefined(m.data); -} - function maxKey(m) { return Belt_internalAVLtree.maxKey(m.data); } @@ -39,18 +31,10 @@ function minimum(m) { return Belt_internalAVLtree.minimum(m.data); } -function minUndefined(m) { - return Belt_internalAVLtree.minUndefined(m.data); -} - function maximum(m) { return Belt_internalAVLtree.maximum(m.data); } -function maxUndefined(m) { - return Belt_internalAVLtree.maxUndefined(m.data); -} - function set(m, k, v) { let old_data = m.data; let v$1 = Belt_internalMapString.addMutate(old_data, k, v); @@ -260,10 +244,6 @@ function get(d, x) { return Belt_internalMapString.get(d.data, x); } -function getUndefined(d, x) { - return Belt_internalMapString.getUndefined(d.data, x); -} - function getWithDefault(d, x, def) { return Belt_internalMapString.getWithDefault(d.data, x, def); } @@ -316,15 +296,10 @@ export { keysToArray, valuesToArray, minKey, - minKeyUndefined, maxKey, - maxKeyUndefined, minimum, - minUndefined, maximum, - maxUndefined, get, - getUndefined, getWithDefault, getExn, getOrThrow, diff --git a/packages/@rescript/runtime/lib/es6/Belt_MutableQueue.mjs b/packages/@rescript/runtime/lib/es6/Belt_MutableQueue.mjs index f9b1b6ba05e..2640eed1e5c 100644 --- a/packages/@rescript/runtime/lib/es6/Belt_MutableQueue.mjs +++ b/packages/@rescript/runtime/lib/es6/Belt_MutableQueue.mjs @@ -40,13 +40,6 @@ function peek(q) { } } -function peekUndefined(q) { - let v = q.first; - if (v !== undefined) { - return v.content; - } -} - function peekOrThrow(q) { let v = q.first; if (v !== undefined) { @@ -93,22 +86,6 @@ function popOrThrow(q) { }; } -function popUndefined(q) { - let x = q.first; - if (x === undefined) { - return; - } - let next = x.next; - if (next === undefined) { - clear(q); - return x.content; - } else { - q.length = q.length - 1 | 0; - q.first = next; - return x.content; - } -} - function copy(q) { let qRes = { length: q.length, @@ -275,11 +252,9 @@ export { fromArray, add, peek, - peekUndefined, peekExn, peekOrThrow, pop, - popUndefined, popExn, popOrThrow, copy, diff --git a/packages/@rescript/runtime/lib/es6/Belt_MutableSet.mjs b/packages/@rescript/runtime/lib/es6/Belt_MutableSet.mjs index a1864184afa..0f52938a482 100644 --- a/packages/@rescript/runtime/lib/es6/Belt_MutableSet.mjs +++ b/packages/@rescript/runtime/lib/es6/Belt_MutableSet.mjs @@ -199,18 +199,10 @@ function minimum(d) { return Belt_internalAVLset.minimum(d.data); } -function minUndefined(d) { - return Belt_internalAVLset.minUndefined(d.data); -} - function maximum(d) { return Belt_internalAVLset.maximum(d.data); } -function maxUndefined(d) { - return Belt_internalAVLset.maxUndefined(d.data); -} - function forEach(d, f) { Belt_internalAVLset.forEach(d.data, f); } @@ -270,10 +262,6 @@ function get(d, x) { return Belt_internalAVLset.get(d.data, x, d.cmp); } -function getUndefined(d, x) { - return Belt_internalAVLset.getUndefined(d.data, x, d.cmp); -} - function getOrThrow(d, x) { return Belt_internalAVLset.getOrThrow(d.data, x, d.cmp); } @@ -514,11 +502,8 @@ export { toList, toArray, minimum, - minUndefined, maximum, - maxUndefined, get, - getUndefined, getExn, getOrThrow, split, diff --git a/packages/@rescript/runtime/lib/es6/Belt_MutableSetInt.mjs b/packages/@rescript/runtime/lib/es6/Belt_MutableSetInt.mjs index 0fbbb3ee47c..659782e9189 100644 --- a/packages/@rescript/runtime/lib/es6/Belt_MutableSetInt.mjs +++ b/packages/@rescript/runtime/lib/es6/Belt_MutableSetInt.mjs @@ -196,18 +196,10 @@ function minimum(d) { return Belt_internalAVLset.minimum(d.data); } -function minUndefined(d) { - return Belt_internalAVLset.minUndefined(d.data); -} - function maximum(d) { return Belt_internalAVLset.maximum(d.data); } -function maxUndefined(d) { - return Belt_internalAVLset.maxUndefined(d.data); -} - function forEach(d, f) { Belt_internalAVLset.forEach(d.data, f); } @@ -264,10 +256,6 @@ function get(d, x) { return Belt_internalSetInt.get(d.data, x); } -function getUndefined(d, x) { - return Belt_internalSetInt.getUndefined(d.data, x); -} - function getOrThrow(d, x) { return Belt_internalSetInt.getOrThrow(d.data, x); } @@ -477,11 +465,8 @@ export { toList, toArray, minimum, - minUndefined, maximum, - maxUndefined, get, - getUndefined, getExn, getOrThrow, split, diff --git a/packages/@rescript/runtime/lib/es6/Belt_MutableSetString.mjs b/packages/@rescript/runtime/lib/es6/Belt_MutableSetString.mjs index f60a7d3ca23..f63cac40468 100644 --- a/packages/@rescript/runtime/lib/es6/Belt_MutableSetString.mjs +++ b/packages/@rescript/runtime/lib/es6/Belt_MutableSetString.mjs @@ -196,18 +196,10 @@ function minimum(d) { return Belt_internalAVLset.minimum(d.data); } -function minUndefined(d) { - return Belt_internalAVLset.minUndefined(d.data); -} - function maximum(d) { return Belt_internalAVLset.maximum(d.data); } -function maxUndefined(d) { - return Belt_internalAVLset.maxUndefined(d.data); -} - function forEach(d, f) { Belt_internalAVLset.forEach(d.data, f); } @@ -264,10 +256,6 @@ function get(d, x) { return Belt_internalSetString.get(d.data, x); } -function getUndefined(d, x) { - return Belt_internalSetString.getUndefined(d.data, x); -} - function getOrThrow(d, x) { return Belt_internalSetString.getOrThrow(d.data, x); } @@ -477,11 +465,8 @@ export { toList, toArray, minimum, - minUndefined, maximum, - maxUndefined, get, - getUndefined, getExn, getOrThrow, split, diff --git a/packages/@rescript/runtime/lib/es6/Belt_MutableStack.mjs b/packages/@rescript/runtime/lib/es6/Belt_MutableStack.mjs index 57580c102a4..25797286152 100644 --- a/packages/@rescript/runtime/lib/es6/Belt_MutableStack.mjs +++ b/packages/@rescript/runtime/lib/es6/Belt_MutableStack.mjs @@ -25,13 +25,6 @@ function push(s, x) { }; } -function topUndefined(s) { - let x = s.root; - if (x !== undefined) { - return x.head; - } -} - function top(s) { let x = s.root; if (x !== undefined) { @@ -43,20 +36,24 @@ function isEmpty(s) { return s.root === undefined; } -function popUndefined(s) { +function pop(s) { let x = s.root; if (x !== undefined) { s.root = x.tail; - return x.head; + return Primitive_option.some(x.head); } } -function pop(s) { +function popOrThrow(s) { let x = s.root; if (x !== undefined) { s.root = x.tail; - return Primitive_option.some(x.head); + return x.head; } + throw { + RE_EXN_ID: "Not_found", + Error: new Error() + }; } function size(s) { @@ -114,9 +111,8 @@ export { clear, copy, push, - popUndefined, pop, - topUndefined, + popOrThrow, top, isEmpty, size, diff --git a/packages/@rescript/runtime/lib/es6/Belt_Set.mjs b/packages/@rescript/runtime/lib/es6/Belt_Set.mjs index 36d576b8525..891ea58887a 100644 --- a/packages/@rescript/runtime/lib/es6/Belt_Set.mjs +++ b/packages/@rescript/runtime/lib/es6/Belt_Set.mjs @@ -176,26 +176,14 @@ function minimum(m) { return Belt_SetDict.minimum(m.data); } -function minUndefined(m) { - return Belt_SetDict.minUndefined(m.data); -} - function maximum(m) { return Belt_SetDict.maximum(m.data); } -function maxUndefined(m) { - return Belt_SetDict.maxUndefined(m.data); -} - function get(m, e) { return Belt_SetDict.get(m.data, e, m.cmp); } -function getUndefined(m, e) { - return Belt_SetDict.getUndefined(m.data, e, m.cmp); -} - function getOrThrow(m, e) { return Belt_SetDict.getOrThrow(m.data, e, m.cmp); } @@ -288,11 +276,8 @@ export { toArray, toList, minimum, - minUndefined, maximum, - maxUndefined, get, - getUndefined, getExn, getOrThrow, split, diff --git a/packages/@rescript/runtime/lib/es6/Belt_SetDict.mjs b/packages/@rescript/runtime/lib/es6/Belt_SetDict.mjs index 1991e3b4c73..538d266f6a0 100644 --- a/packages/@rescript/runtime/lib/es6/Belt_SetDict.mjs +++ b/packages/@rescript/runtime/lib/es6/Belt_SetDict.mjs @@ -304,16 +304,10 @@ let toArray = Belt_internalAVLset.toArray; let minimum = Belt_internalAVLset.minimum; -let minUndefined = Belt_internalAVLset.minUndefined; - let maximum = Belt_internalAVLset.maximum; -let maxUndefined = Belt_internalAVLset.maxUndefined; - let get = Belt_internalAVLset.get; -let getUndefined = Belt_internalAVLset.getUndefined; - let getExn = Belt_internalAVLset.getOrThrow; let getOrThrow = Belt_internalAVLset.getOrThrow; @@ -352,11 +346,8 @@ export { toList, toArray, minimum, - minUndefined, maximum, - maxUndefined, get, - getUndefined, getExn, getOrThrow, split, diff --git a/packages/@rescript/runtime/lib/es6/Belt_SetInt.mjs b/packages/@rescript/runtime/lib/es6/Belt_SetInt.mjs index 4d30ebbd2b3..81b93fc7ded 100644 --- a/packages/@rescript/runtime/lib/es6/Belt_SetInt.mjs +++ b/packages/@rescript/runtime/lib/es6/Belt_SetInt.mjs @@ -301,16 +301,10 @@ let toArray = Belt_internalAVLset.toArray; let minimum = Belt_internalAVLset.minimum; -let minUndefined = Belt_internalAVLset.minUndefined; - let maximum = Belt_internalAVLset.maximum; -let maxUndefined = Belt_internalAVLset.maxUndefined; - let get = Belt_internalSetInt.get; -let getUndefined = Belt_internalSetInt.getUndefined; - let getExn = Belt_internalSetInt.getOrThrow; let getOrThrow = Belt_internalSetInt.getOrThrow; @@ -349,11 +343,8 @@ export { toList, toArray, minimum, - minUndefined, maximum, - maxUndefined, get, - getUndefined, getExn, getOrThrow, split, diff --git a/packages/@rescript/runtime/lib/es6/Belt_SetString.mjs b/packages/@rescript/runtime/lib/es6/Belt_SetString.mjs index a98e5ae040c..e2f2982d4ad 100644 --- a/packages/@rescript/runtime/lib/es6/Belt_SetString.mjs +++ b/packages/@rescript/runtime/lib/es6/Belt_SetString.mjs @@ -301,16 +301,10 @@ let toArray = Belt_internalAVLset.toArray; let minimum = Belt_internalAVLset.minimum; -let minUndefined = Belt_internalAVLset.minUndefined; - let maximum = Belt_internalAVLset.maximum; -let maxUndefined = Belt_internalAVLset.maxUndefined; - let get = Belt_internalSetString.get; -let getUndefined = Belt_internalSetString.getUndefined; - let getExn = Belt_internalSetString.getOrThrow; let getOrThrow = Belt_internalSetString.getOrThrow; @@ -349,11 +343,8 @@ export { toList, toArray, minimum, - minUndefined, maximum, - maxUndefined, get, - getUndefined, getExn, getOrThrow, split, diff --git a/packages/@rescript/runtime/lib/es6/Belt_internalAVLset.mjs b/packages/@rescript/runtime/lib/es6/Belt_internalAVLset.mjs index 889662c2977..f679e28aaf3 100644 --- a/packages/@rescript/runtime/lib/es6/Belt_internalAVLset.mjs +++ b/packages/@rescript/runtime/lib/es6/Belt_internalAVLset.mjs @@ -100,12 +100,6 @@ function minimum(n) { } } -function minUndefined(n) { - if (n !== undefined) { - return min0Aux(n); - } -} - function max0Aux(_n) { while (true) { let n = _n; @@ -124,12 +118,6 @@ function maximum(n) { } } -function maxUndefined(n) { - if (n !== undefined) { - return max0Aux(n); - } -} - function removeMinAuxWithRef(n, v) { let ln = n.l; if (ln !== undefined) { @@ -350,7 +338,7 @@ function checkInvariantInternal(_v) { RE_EXN_ID: "Assert_failure", _1: [ "Belt_internalAVLset.res", - 292, + 280, 4 ], Error: new Error() @@ -668,22 +656,6 @@ function get(_n, x, cmp) { }; } -function getUndefined(_n, x, cmp) { - while (true) { - let n = _n; - if (n === undefined) { - return; - } - let v = n.v; - let c = cmp(x, v); - if (c === 0) { - return v; - } - _n = c < 0 ? n.l : n.r; - continue; - }; -} - function getOrThrow(_n, x, cmp) { while (true) { let n = _n; @@ -842,9 +814,7 @@ export { bal, singleton, minimum, - minUndefined, maximum, - maxUndefined, removeMinAuxWithRef, isEmpty, stackAllLeft, @@ -872,7 +842,6 @@ export { eq, subset, get, - getUndefined, getOrThrow, fromArray, addMutate, diff --git a/packages/@rescript/runtime/lib/es6/Belt_internalAVLtree.mjs b/packages/@rescript/runtime/lib/es6/Belt_internalAVLtree.mjs index 35886b05be6..6f5f86f0aee 100644 --- a/packages/@rescript/runtime/lib/es6/Belt_internalAVLtree.mjs +++ b/packages/@rescript/runtime/lib/es6/Belt_internalAVLtree.mjs @@ -122,12 +122,6 @@ function minKey(n) { } } -function minKeyUndefined(n) { - if (n !== undefined) { - return minKey0Aux(n); - } -} - function maxKey0Aux(_n) { while (true) { let n = _n; @@ -146,12 +140,6 @@ function maxKey(n) { } } -function maxKeyUndefined(n) { - if (n !== undefined) { - return maxKey0Aux(n); - } -} - function minKV0Aux(_n) { while (true) { let n = _n; @@ -173,12 +161,6 @@ function minimum(n) { } } -function minUndefined(n) { - if (n !== undefined) { - return minKV0Aux(n); - } -} - function maxKV0Aux(_n) { while (true) { let n = _n; @@ -200,12 +182,6 @@ function maximum(n) { } } -function maxUndefined(n) { - if (n !== undefined) { - return maxKV0Aux(n); - } -} - function removeMinAuxWithRef(n, kr, vr) { let ln = n.l; if (ln !== undefined) { @@ -542,7 +518,7 @@ function checkInvariantInternal(_v) { RE_EXN_ID: "Assert_failure", _1: [ "Belt_internalAVLtree.res", - 432, + 408, 4 ], Error: new Error() @@ -812,22 +788,6 @@ function get(_n, x, cmp) { }; } -function getUndefined(_n, x, cmp) { - while (true) { - let n = _n; - if (n === undefined) { - return; - } - let v = n.k; - let c = cmp(x, v); - if (c === 0) { - return n.v; - } - _n = c < 0 ? n.l : n.r; - continue; - }; -} - function getOrThrow(_n, x, cmp) { while (true) { let n = _n; @@ -1014,13 +974,9 @@ export { singleton, updateValue, minKey, - minKeyUndefined, maxKey, - maxKeyUndefined, minimum, - minUndefined, maximum, - maxUndefined, removeMinAuxWithRef, isEmpty, stackAllLeft, @@ -1051,7 +1007,6 @@ export { cmp, eq, get, - getUndefined, getWithDefault, getOrThrow, has, diff --git a/packages/@rescript/runtime/lib/es6/Belt_internalMapInt.mjs b/packages/@rescript/runtime/lib/es6/Belt_internalMapInt.mjs index a31bfed334e..687fca236e3 100644 --- a/packages/@rescript/runtime/lib/es6/Belt_internalMapInt.mjs +++ b/packages/@rescript/runtime/lib/es6/Belt_internalMapInt.mjs @@ -36,21 +36,6 @@ function get(_n, x) { }; } -function getUndefined(_n, x) { - while (true) { - let n = _n; - if (n === undefined) { - return; - } - let v = n.k; - if (x === v) { - return n.v; - } - _n = x < v ? n.l : n.r; - continue; - }; -} - function getOrThrow(_n, x) { while (true) { let n = _n; @@ -334,7 +319,6 @@ export { S, add, get, - getUndefined, getOrThrow, getWithDefault, has, diff --git a/packages/@rescript/runtime/lib/es6/Belt_internalMapString.mjs b/packages/@rescript/runtime/lib/es6/Belt_internalMapString.mjs index cc06d894f3b..8db48ead6a5 100644 --- a/packages/@rescript/runtime/lib/es6/Belt_internalMapString.mjs +++ b/packages/@rescript/runtime/lib/es6/Belt_internalMapString.mjs @@ -36,21 +36,6 @@ function get(_n, x) { }; } -function getUndefined(_n, x) { - while (true) { - let n = _n; - if (n === undefined) { - return; - } - let v = n.k; - if (x === v) { - return n.v; - } - _n = x < v ? n.l : n.r; - continue; - }; -} - function getOrThrow(_n, x) { while (true) { let n = _n; @@ -334,7 +319,6 @@ export { S, add, get, - getUndefined, getOrThrow, getWithDefault, has, diff --git a/packages/@rescript/runtime/lib/es6/Belt_internalSetInt.mjs b/packages/@rescript/runtime/lib/es6/Belt_internalSetInt.mjs index 702bc6c9a68..ccaeefcde89 100644 --- a/packages/@rescript/runtime/lib/es6/Belt_internalSetInt.mjs +++ b/packages/@rescript/runtime/lib/es6/Belt_internalSetInt.mjs @@ -115,21 +115,6 @@ function get(_n, x) { }; } -function getUndefined(_n, x) { - while (true) { - let n = _n; - if (n === undefined) { - return; - } - let v = n.v; - if (x === v) { - return v; - } - _n = x < v ? n.l : n.r; - continue; - }; -} - function getOrThrow(_n, x) { while (true) { let n = _n; @@ -201,7 +186,6 @@ export { eq, subset, get, - getUndefined, getOrThrow, addMutate, fromArray, diff --git a/packages/@rescript/runtime/lib/es6/Belt_internalSetString.mjs b/packages/@rescript/runtime/lib/es6/Belt_internalSetString.mjs index aa33452bdfa..d0173f633db 100644 --- a/packages/@rescript/runtime/lib/es6/Belt_internalSetString.mjs +++ b/packages/@rescript/runtime/lib/es6/Belt_internalSetString.mjs @@ -115,21 +115,6 @@ function get(_n, x) { }; } -function getUndefined(_n, x) { - while (true) { - let n = _n; - if (n === undefined) { - return; - } - let v = n.v; - if (x === v) { - return v; - } - _n = x < v ? n.l : n.r; - continue; - }; -} - function getOrThrow(_n, x) { while (true) { let n = _n; @@ -201,7 +186,6 @@ export { eq, subset, get, - getUndefined, getOrThrow, addMutate, fromArray, diff --git a/packages/@rescript/runtime/lib/js/Belt_Array.cjs b/packages/@rescript/runtime/lib/js/Belt_Array.cjs index 9289d8b2599..cbc613a08fc 100644 --- a/packages/@rescript/runtime/lib/js/Belt_Array.cjs +++ b/packages/@rescript/runtime/lib/js/Belt_Array.cjs @@ -15,7 +15,7 @@ function getOrThrow(arr, i) { RE_EXN_ID: "Assert_failure", _1: [ "Belt_Array.res", - 29, + 27, 2 ], Error: new Error() @@ -39,7 +39,7 @@ function setOrThrow(arr, i, v) { RE_EXN_ID: "Assert_failure", _1: [ "Belt_Array.res", - 44, + 42, 2 ], Error: new Error() diff --git a/packages/@rescript/runtime/lib/js/Belt_Map.cjs b/packages/@rescript/runtime/lib/js/Belt_Map.cjs index 2e3d073863a..5221fd8c74d 100644 --- a/packages/@rescript/runtime/lib/js/Belt_Map.cjs +++ b/packages/@rescript/runtime/lib/js/Belt_Map.cjs @@ -175,42 +175,22 @@ function minKey(m) { return Belt_MapDict.minKey(m.data); } -function minKeyUndefined(m) { - return Belt_MapDict.minKeyUndefined(m.data); -} - function maxKey(m) { return Belt_MapDict.maxKey(m.data); } -function maxKeyUndefined(m) { - return Belt_MapDict.maxKeyUndefined(m.data); -} - function minimum(m) { return Belt_MapDict.minimum(m.data); } -function minUndefined(m) { - return Belt_MapDict.minUndefined(m.data); -} - function maximum(m) { return Belt_MapDict.maximum(m.data); } -function maxUndefined(m) { - return Belt_MapDict.maxUndefined(m.data); -} - function get(map, x) { return Belt_MapDict.get(map.data, x, map.cmp); } -function getUndefined(map, x) { - return Belt_MapDict.getUndefined(map.data, x, map.cmp); -} - function getWithDefault(map, x, def) { return Belt_MapDict.getWithDefault(map.data, x, def, map.cmp); } @@ -314,15 +294,10 @@ exports.fromArray = fromArray; exports.keysToArray = keysToArray; exports.valuesToArray = valuesToArray; exports.minKey = minKey; -exports.minKeyUndefined = minKeyUndefined; exports.maxKey = maxKey; -exports.maxKeyUndefined = maxKeyUndefined; exports.minimum = minimum; -exports.minUndefined = minUndefined; exports.maximum = maximum; -exports.maxUndefined = maxUndefined; exports.get = get; -exports.getUndefined = getUndefined; exports.getWithDefault = getWithDefault; exports.getExn = getExn; exports.getOrThrow = getOrThrow; diff --git a/packages/@rescript/runtime/lib/js/Belt_MapDict.cjs b/packages/@rescript/runtime/lib/js/Belt_MapDict.cjs index 498dfa0a960..2da494c41ec 100644 --- a/packages/@rescript/runtime/lib/js/Belt_MapDict.cjs +++ b/packages/@rescript/runtime/lib/js/Belt_MapDict.cjs @@ -304,24 +304,14 @@ let valuesToArray = Belt_internalAVLtree.valuesToArray; let minKey = Belt_internalAVLtree.minKey; -let minKeyUndefined = Belt_internalAVLtree.minKeyUndefined; - let maxKey = Belt_internalAVLtree.maxKey; -let maxKeyUndefined = Belt_internalAVLtree.maxKeyUndefined; - let minimum = Belt_internalAVLtree.minimum; -let minUndefined = Belt_internalAVLtree.minUndefined; - let maximum = Belt_internalAVLtree.maximum; -let maxUndefined = Belt_internalAVLtree.maxUndefined; - let get = Belt_internalAVLtree.get; -let getUndefined = Belt_internalAVLtree.getUndefined; - let getWithDefault = Belt_internalAVLtree.getWithDefault; let getExn = Belt_internalAVLtree.getOrThrow; @@ -374,15 +364,10 @@ exports.fromArray = fromArray; exports.keysToArray = keysToArray; exports.valuesToArray = valuesToArray; exports.minKey = minKey; -exports.minKeyUndefined = minKeyUndefined; exports.maxKey = maxKey; -exports.maxKeyUndefined = maxKeyUndefined; exports.minimum = minimum; -exports.minUndefined = minUndefined; exports.maximum = maximum; -exports.maxUndefined = maxUndefined; exports.get = get; -exports.getUndefined = getUndefined; exports.getWithDefault = getWithDefault; exports.getExn = getExn; exports.getOrThrow = getOrThrow; diff --git a/packages/@rescript/runtime/lib/js/Belt_MapInt.cjs b/packages/@rescript/runtime/lib/js/Belt_MapInt.cjs index f7e6a1a53e7..468f503562c 100644 --- a/packages/@rescript/runtime/lib/js/Belt_MapInt.cjs +++ b/packages/@rescript/runtime/lib/js/Belt_MapInt.cjs @@ -196,24 +196,14 @@ let valuesToArray = Belt_internalAVLtree.valuesToArray; let minKey = Belt_internalAVLtree.minKey; -let minKeyUndefined = Belt_internalAVLtree.minKeyUndefined; - let maxKey = Belt_internalAVLtree.maxKey; -let maxKeyUndefined = Belt_internalAVLtree.maxKeyUndefined; - let minimum = Belt_internalAVLtree.minimum; -let minUndefined = Belt_internalAVLtree.minUndefined; - let maximum = Belt_internalAVLtree.maximum; -let maxUndefined = Belt_internalAVLtree.maxUndefined; - let get = Belt_internalMapInt.get; -let getUndefined = Belt_internalMapInt.getUndefined; - let getWithDefault = Belt_internalMapInt.getWithDefault; let getExn = Belt_internalMapInt.getOrThrow; @@ -270,15 +260,10 @@ exports.fromArray = fromArray; exports.keysToArray = keysToArray; exports.valuesToArray = valuesToArray; exports.minKey = minKey; -exports.minKeyUndefined = minKeyUndefined; exports.maxKey = maxKey; -exports.maxKeyUndefined = maxKeyUndefined; exports.minimum = minimum; -exports.minUndefined = minUndefined; exports.maximum = maximum; -exports.maxUndefined = maxUndefined; exports.get = get; -exports.getUndefined = getUndefined; exports.getWithDefault = getWithDefault; exports.getExn = getExn; exports.getOrThrow = getOrThrow; diff --git a/packages/@rescript/runtime/lib/js/Belt_MapString.cjs b/packages/@rescript/runtime/lib/js/Belt_MapString.cjs index 1de8dd3a5ff..e68674e64e4 100644 --- a/packages/@rescript/runtime/lib/js/Belt_MapString.cjs +++ b/packages/@rescript/runtime/lib/js/Belt_MapString.cjs @@ -196,24 +196,14 @@ let valuesToArray = Belt_internalAVLtree.valuesToArray; let minKey = Belt_internalAVLtree.minKey; -let minKeyUndefined = Belt_internalAVLtree.minKeyUndefined; - let maxKey = Belt_internalAVLtree.maxKey; -let maxKeyUndefined = Belt_internalAVLtree.maxKeyUndefined; - let minimum = Belt_internalAVLtree.minimum; -let minUndefined = Belt_internalAVLtree.minUndefined; - let maximum = Belt_internalAVLtree.maximum; -let maxUndefined = Belt_internalAVLtree.maxUndefined; - let get = Belt_internalMapString.get; -let getUndefined = Belt_internalMapString.getUndefined; - let getWithDefault = Belt_internalMapString.getWithDefault; let getExn = Belt_internalMapString.getOrThrow; @@ -270,15 +260,10 @@ exports.fromArray = fromArray; exports.keysToArray = keysToArray; exports.valuesToArray = valuesToArray; exports.minKey = minKey; -exports.minKeyUndefined = minKeyUndefined; exports.maxKey = maxKey; -exports.maxKeyUndefined = maxKeyUndefined; exports.minimum = minimum; -exports.minUndefined = minUndefined; exports.maximum = maximum; -exports.maxUndefined = maxUndefined; exports.get = get; -exports.getUndefined = getUndefined; exports.getWithDefault = getWithDefault; exports.getExn = getExn; exports.getOrThrow = getOrThrow; diff --git a/packages/@rescript/runtime/lib/js/Belt_MutableMap.cjs b/packages/@rescript/runtime/lib/js/Belt_MutableMap.cjs index ea2f4c3d703..e1c5bd40e81 100644 --- a/packages/@rescript/runtime/lib/js/Belt_MutableMap.cjs +++ b/packages/@rescript/runtime/lib/js/Belt_MutableMap.cjs @@ -152,34 +152,18 @@ function minKey(m) { return Belt_internalAVLtree.minKey(m.data); } -function minKeyUndefined(m) { - return Belt_internalAVLtree.minKeyUndefined(m.data); -} - function maxKey(m) { return Belt_internalAVLtree.maxKey(m.data); } -function maxKeyUndefined(m) { - return Belt_internalAVLtree.maxKeyUndefined(m.data); -} - function minimum(m) { return Belt_internalAVLtree.minimum(m.data); } -function minUndefined(m) { - return Belt_internalAVLtree.minUndefined(m.data); -} - function maximum(m) { return Belt_internalAVLtree.maximum(m.data); } -function maxUndefined(m) { - return Belt_internalAVLtree.maxUndefined(m.data); -} - function forEach(d, f) { Belt_internalAVLtree.forEach(d.data, f); } @@ -246,10 +230,6 @@ function get(m, x) { return Belt_internalAVLtree.get(m.data, x, m.cmp); } -function getUndefined(m, x) { - return Belt_internalAVLtree.getUndefined(m.data, x, m.cmp); -} - function getWithDefault(m, x, def) { return Belt_internalAVLtree.getWithDefault(m.data, x, def, m.cmp); } @@ -346,15 +326,10 @@ exports.fromArray = fromArray; exports.keysToArray = keysToArray; exports.valuesToArray = valuesToArray; exports.minKey = minKey; -exports.minKeyUndefined = minKeyUndefined; exports.maxKey = maxKey; -exports.maxKeyUndefined = maxKeyUndefined; exports.minimum = minimum; -exports.minUndefined = minUndefined; exports.maximum = maximum; -exports.maxUndefined = maxUndefined; exports.get = get; -exports.getUndefined = getUndefined; exports.getWithDefault = getWithDefault; exports.getExn = getExn; exports.getOrThrow = getOrThrow; diff --git a/packages/@rescript/runtime/lib/js/Belt_MutableMapInt.cjs b/packages/@rescript/runtime/lib/js/Belt_MutableMapInt.cjs index c90d8b05710..bb296711ee2 100644 --- a/packages/@rescript/runtime/lib/js/Belt_MutableMapInt.cjs +++ b/packages/@rescript/runtime/lib/js/Belt_MutableMapInt.cjs @@ -19,18 +19,10 @@ function clear(m) { m.data = undefined; } -function minKeyUndefined(m) { - return Belt_internalAVLtree.minKeyUndefined(m.data); -} - function minKey(m) { return Belt_internalAVLtree.minKey(m.data); } -function maxKeyUndefined(m) { - return Belt_internalAVLtree.maxKeyUndefined(m.data); -} - function maxKey(m) { return Belt_internalAVLtree.maxKey(m.data); } @@ -39,18 +31,10 @@ function minimum(m) { return Belt_internalAVLtree.minimum(m.data); } -function minUndefined(m) { - return Belt_internalAVLtree.minUndefined(m.data); -} - function maximum(m) { return Belt_internalAVLtree.maximum(m.data); } -function maxUndefined(m) { - return Belt_internalAVLtree.maxUndefined(m.data); -} - function set(m, k, v) { let old_data = m.data; let v$1 = Belt_internalMapInt.addMutate(old_data, k, v); @@ -260,10 +244,6 @@ function get(d, x) { return Belt_internalMapInt.get(d.data, x); } -function getUndefined(d, x) { - return Belt_internalMapInt.getUndefined(d.data, x); -} - function getWithDefault(d, x, def) { return Belt_internalMapInt.getWithDefault(d.data, x, def); } @@ -315,15 +295,10 @@ exports.fromArray = fromArray; exports.keysToArray = keysToArray; exports.valuesToArray = valuesToArray; exports.minKey = minKey; -exports.minKeyUndefined = minKeyUndefined; exports.maxKey = maxKey; -exports.maxKeyUndefined = maxKeyUndefined; exports.minimum = minimum; -exports.minUndefined = minUndefined; exports.maximum = maximum; -exports.maxUndefined = maxUndefined; exports.get = get; -exports.getUndefined = getUndefined; exports.getWithDefault = getWithDefault; exports.getExn = getExn; exports.getOrThrow = getOrThrow; diff --git a/packages/@rescript/runtime/lib/js/Belt_MutableMapString.cjs b/packages/@rescript/runtime/lib/js/Belt_MutableMapString.cjs index a096bb0f324..27dabb44a7b 100644 --- a/packages/@rescript/runtime/lib/js/Belt_MutableMapString.cjs +++ b/packages/@rescript/runtime/lib/js/Belt_MutableMapString.cjs @@ -19,18 +19,10 @@ function clear(m) { m.data = undefined; } -function minKeyUndefined(m) { - return Belt_internalAVLtree.minKeyUndefined(m.data); -} - function minKey(m) { return Belt_internalAVLtree.minKey(m.data); } -function maxKeyUndefined(m) { - return Belt_internalAVLtree.maxKeyUndefined(m.data); -} - function maxKey(m) { return Belt_internalAVLtree.maxKey(m.data); } @@ -39,18 +31,10 @@ function minimum(m) { return Belt_internalAVLtree.minimum(m.data); } -function minUndefined(m) { - return Belt_internalAVLtree.minUndefined(m.data); -} - function maximum(m) { return Belt_internalAVLtree.maximum(m.data); } -function maxUndefined(m) { - return Belt_internalAVLtree.maxUndefined(m.data); -} - function set(m, k, v) { let old_data = m.data; let v$1 = Belt_internalMapString.addMutate(old_data, k, v); @@ -260,10 +244,6 @@ function get(d, x) { return Belt_internalMapString.get(d.data, x); } -function getUndefined(d, x) { - return Belt_internalMapString.getUndefined(d.data, x); -} - function getWithDefault(d, x, def) { return Belt_internalMapString.getWithDefault(d.data, x, def); } @@ -315,15 +295,10 @@ exports.fromArray = fromArray; exports.keysToArray = keysToArray; exports.valuesToArray = valuesToArray; exports.minKey = minKey; -exports.minKeyUndefined = minKeyUndefined; exports.maxKey = maxKey; -exports.maxKeyUndefined = maxKeyUndefined; exports.minimum = minimum; -exports.minUndefined = minUndefined; exports.maximum = maximum; -exports.maxUndefined = maxUndefined; exports.get = get; -exports.getUndefined = getUndefined; exports.getWithDefault = getWithDefault; exports.getExn = getExn; exports.getOrThrow = getOrThrow; diff --git a/packages/@rescript/runtime/lib/js/Belt_MutableQueue.cjs b/packages/@rescript/runtime/lib/js/Belt_MutableQueue.cjs index 6586ca1e3e8..6fd919d3f1b 100644 --- a/packages/@rescript/runtime/lib/js/Belt_MutableQueue.cjs +++ b/packages/@rescript/runtime/lib/js/Belt_MutableQueue.cjs @@ -40,13 +40,6 @@ function peek(q) { } } -function peekUndefined(q) { - let v = q.first; - if (v !== undefined) { - return v.content; - } -} - function peekOrThrow(q) { let v = q.first; if (v !== undefined) { @@ -93,22 +86,6 @@ function popOrThrow(q) { }; } -function popUndefined(q) { - let x = q.first; - if (x === undefined) { - return; - } - let next = x.next; - if (next === undefined) { - clear(q); - return x.content; - } else { - q.length = q.length - 1 | 0; - q.first = next; - return x.content; - } -} - function copy(q) { let qRes = { length: q.length, @@ -274,11 +251,9 @@ exports.isEmpty = isEmpty; exports.fromArray = fromArray; exports.add = add; exports.peek = peek; -exports.peekUndefined = peekUndefined; exports.peekExn = peekExn; exports.peekOrThrow = peekOrThrow; exports.pop = pop; -exports.popUndefined = popUndefined; exports.popExn = popExn; exports.popOrThrow = popOrThrow; exports.copy = copy; diff --git a/packages/@rescript/runtime/lib/js/Belt_MutableSet.cjs b/packages/@rescript/runtime/lib/js/Belt_MutableSet.cjs index 33878ffa9b8..2d44004d261 100644 --- a/packages/@rescript/runtime/lib/js/Belt_MutableSet.cjs +++ b/packages/@rescript/runtime/lib/js/Belt_MutableSet.cjs @@ -199,18 +199,10 @@ function minimum(d) { return Belt_internalAVLset.minimum(d.data); } -function minUndefined(d) { - return Belt_internalAVLset.minUndefined(d.data); -} - function maximum(d) { return Belt_internalAVLset.maximum(d.data); } -function maxUndefined(d) { - return Belt_internalAVLset.maxUndefined(d.data); -} - function forEach(d, f) { Belt_internalAVLset.forEach(d.data, f); } @@ -270,10 +262,6 @@ function get(d, x) { return Belt_internalAVLset.get(d.data, x, d.cmp); } -function getUndefined(d, x) { - return Belt_internalAVLset.getUndefined(d.data, x, d.cmp); -} - function getOrThrow(d, x) { return Belt_internalAVLset.getOrThrow(d.data, x, d.cmp); } @@ -513,11 +501,8 @@ exports.size = size; exports.toList = toList; exports.toArray = toArray; exports.minimum = minimum; -exports.minUndefined = minUndefined; exports.maximum = maximum; -exports.maxUndefined = maxUndefined; exports.get = get; -exports.getUndefined = getUndefined; exports.getExn = getExn; exports.getOrThrow = getOrThrow; exports.split = split; diff --git a/packages/@rescript/runtime/lib/js/Belt_MutableSetInt.cjs b/packages/@rescript/runtime/lib/js/Belt_MutableSetInt.cjs index c33abad371c..ef9d822b31e 100644 --- a/packages/@rescript/runtime/lib/js/Belt_MutableSetInt.cjs +++ b/packages/@rescript/runtime/lib/js/Belt_MutableSetInt.cjs @@ -196,18 +196,10 @@ function minimum(d) { return Belt_internalAVLset.minimum(d.data); } -function minUndefined(d) { - return Belt_internalAVLset.minUndefined(d.data); -} - function maximum(d) { return Belt_internalAVLset.maximum(d.data); } -function maxUndefined(d) { - return Belt_internalAVLset.maxUndefined(d.data); -} - function forEach(d, f) { Belt_internalAVLset.forEach(d.data, f); } @@ -264,10 +256,6 @@ function get(d, x) { return Belt_internalSetInt.get(d.data, x); } -function getUndefined(d, x) { - return Belt_internalSetInt.getUndefined(d.data, x); -} - function getOrThrow(d, x) { return Belt_internalSetInt.getOrThrow(d.data, x); } @@ -476,11 +464,8 @@ exports.size = size; exports.toList = toList; exports.toArray = toArray; exports.minimum = minimum; -exports.minUndefined = minUndefined; exports.maximum = maximum; -exports.maxUndefined = maxUndefined; exports.get = get; -exports.getUndefined = getUndefined; exports.getExn = getExn; exports.getOrThrow = getOrThrow; exports.split = split; diff --git a/packages/@rescript/runtime/lib/js/Belt_MutableSetString.cjs b/packages/@rescript/runtime/lib/js/Belt_MutableSetString.cjs index 4653de27b78..b1abaccad1a 100644 --- a/packages/@rescript/runtime/lib/js/Belt_MutableSetString.cjs +++ b/packages/@rescript/runtime/lib/js/Belt_MutableSetString.cjs @@ -196,18 +196,10 @@ function minimum(d) { return Belt_internalAVLset.minimum(d.data); } -function minUndefined(d) { - return Belt_internalAVLset.minUndefined(d.data); -} - function maximum(d) { return Belt_internalAVLset.maximum(d.data); } -function maxUndefined(d) { - return Belt_internalAVLset.maxUndefined(d.data); -} - function forEach(d, f) { Belt_internalAVLset.forEach(d.data, f); } @@ -264,10 +256,6 @@ function get(d, x) { return Belt_internalSetString.get(d.data, x); } -function getUndefined(d, x) { - return Belt_internalSetString.getUndefined(d.data, x); -} - function getOrThrow(d, x) { return Belt_internalSetString.getOrThrow(d.data, x); } @@ -476,11 +464,8 @@ exports.size = size; exports.toList = toList; exports.toArray = toArray; exports.minimum = minimum; -exports.minUndefined = minUndefined; exports.maximum = maximum; -exports.maxUndefined = maxUndefined; exports.get = get; -exports.getUndefined = getUndefined; exports.getExn = getExn; exports.getOrThrow = getOrThrow; exports.split = split; diff --git a/packages/@rescript/runtime/lib/js/Belt_MutableStack.cjs b/packages/@rescript/runtime/lib/js/Belt_MutableStack.cjs index 91e208223c2..d5899040684 100644 --- a/packages/@rescript/runtime/lib/js/Belt_MutableStack.cjs +++ b/packages/@rescript/runtime/lib/js/Belt_MutableStack.cjs @@ -25,13 +25,6 @@ function push(s, x) { }; } -function topUndefined(s) { - let x = s.root; - if (x !== undefined) { - return x.head; - } -} - function top(s) { let x = s.root; if (x !== undefined) { @@ -43,20 +36,24 @@ function isEmpty(s) { return s.root === undefined; } -function popUndefined(s) { +function pop(s) { let x = s.root; if (x !== undefined) { s.root = x.tail; - return x.head; + return Primitive_option.some(x.head); } } -function pop(s) { +function popOrThrow(s) { let x = s.root; if (x !== undefined) { s.root = x.tail; - return Primitive_option.some(x.head); + return x.head; } + throw { + RE_EXN_ID: "Not_found", + Error: new Error() + }; } function size(s) { @@ -113,9 +110,8 @@ exports.make = make; exports.clear = clear; exports.copy = copy; exports.push = push; -exports.popUndefined = popUndefined; exports.pop = pop; -exports.topUndefined = topUndefined; +exports.popOrThrow = popOrThrow; exports.top = top; exports.isEmpty = isEmpty; exports.size = size; diff --git a/packages/@rescript/runtime/lib/js/Belt_Set.cjs b/packages/@rescript/runtime/lib/js/Belt_Set.cjs index 0b5b90664ba..4211817ed5e 100644 --- a/packages/@rescript/runtime/lib/js/Belt_Set.cjs +++ b/packages/@rescript/runtime/lib/js/Belt_Set.cjs @@ -176,26 +176,14 @@ function minimum(m) { return Belt_SetDict.minimum(m.data); } -function minUndefined(m) { - return Belt_SetDict.minUndefined(m.data); -} - function maximum(m) { return Belt_SetDict.maximum(m.data); } -function maxUndefined(m) { - return Belt_SetDict.maxUndefined(m.data); -} - function get(m, e) { return Belt_SetDict.get(m.data, e, m.cmp); } -function getUndefined(m, e) { - return Belt_SetDict.getUndefined(m.data, e, m.cmp); -} - function getOrThrow(m, e) { return Belt_SetDict.getOrThrow(m.data, e, m.cmp); } @@ -287,11 +275,8 @@ exports.size = size; exports.toArray = toArray; exports.toList = toList; exports.minimum = minimum; -exports.minUndefined = minUndefined; exports.maximum = maximum; -exports.maxUndefined = maxUndefined; exports.get = get; -exports.getUndefined = getUndefined; exports.getExn = getExn; exports.getOrThrow = getOrThrow; exports.split = split; diff --git a/packages/@rescript/runtime/lib/js/Belt_SetDict.cjs b/packages/@rescript/runtime/lib/js/Belt_SetDict.cjs index 24874407038..55849d49cd4 100644 --- a/packages/@rescript/runtime/lib/js/Belt_SetDict.cjs +++ b/packages/@rescript/runtime/lib/js/Belt_SetDict.cjs @@ -304,16 +304,10 @@ let toArray = Belt_internalAVLset.toArray; let minimum = Belt_internalAVLset.minimum; -let minUndefined = Belt_internalAVLset.minUndefined; - let maximum = Belt_internalAVLset.maximum; -let maxUndefined = Belt_internalAVLset.maxUndefined; - let get = Belt_internalAVLset.get; -let getUndefined = Belt_internalAVLset.getUndefined; - let getExn = Belt_internalAVLset.getOrThrow; let getOrThrow = Belt_internalAVLset.getOrThrow; @@ -351,11 +345,8 @@ exports.size = size; exports.toList = toList; exports.toArray = toArray; exports.minimum = minimum; -exports.minUndefined = minUndefined; exports.maximum = maximum; -exports.maxUndefined = maxUndefined; exports.get = get; -exports.getUndefined = getUndefined; exports.getExn = getExn; exports.getOrThrow = getOrThrow; exports.split = split; diff --git a/packages/@rescript/runtime/lib/js/Belt_SetInt.cjs b/packages/@rescript/runtime/lib/js/Belt_SetInt.cjs index 5a27ab8cece..6dba04e05ff 100644 --- a/packages/@rescript/runtime/lib/js/Belt_SetInt.cjs +++ b/packages/@rescript/runtime/lib/js/Belt_SetInt.cjs @@ -301,16 +301,10 @@ let toArray = Belt_internalAVLset.toArray; let minimum = Belt_internalAVLset.minimum; -let minUndefined = Belt_internalAVLset.minUndefined; - let maximum = Belt_internalAVLset.maximum; -let maxUndefined = Belt_internalAVLset.maxUndefined; - let get = Belt_internalSetInt.get; -let getUndefined = Belt_internalSetInt.getUndefined; - let getExn = Belt_internalSetInt.getOrThrow; let getOrThrow = Belt_internalSetInt.getOrThrow; @@ -348,11 +342,8 @@ exports.size = size; exports.toList = toList; exports.toArray = toArray; exports.minimum = minimum; -exports.minUndefined = minUndefined; exports.maximum = maximum; -exports.maxUndefined = maxUndefined; exports.get = get; -exports.getUndefined = getUndefined; exports.getExn = getExn; exports.getOrThrow = getOrThrow; exports.split = split; diff --git a/packages/@rescript/runtime/lib/js/Belt_SetString.cjs b/packages/@rescript/runtime/lib/js/Belt_SetString.cjs index a449b02df90..a30162bdc04 100644 --- a/packages/@rescript/runtime/lib/js/Belt_SetString.cjs +++ b/packages/@rescript/runtime/lib/js/Belt_SetString.cjs @@ -301,16 +301,10 @@ let toArray = Belt_internalAVLset.toArray; let minimum = Belt_internalAVLset.minimum; -let minUndefined = Belt_internalAVLset.minUndefined; - let maximum = Belt_internalAVLset.maximum; -let maxUndefined = Belt_internalAVLset.maxUndefined; - let get = Belt_internalSetString.get; -let getUndefined = Belt_internalSetString.getUndefined; - let getExn = Belt_internalSetString.getOrThrow; let getOrThrow = Belt_internalSetString.getOrThrow; @@ -348,11 +342,8 @@ exports.size = size; exports.toList = toList; exports.toArray = toArray; exports.minimum = minimum; -exports.minUndefined = minUndefined; exports.maximum = maximum; -exports.maxUndefined = maxUndefined; exports.get = get; -exports.getUndefined = getUndefined; exports.getExn = getExn; exports.getOrThrow = getOrThrow; exports.split = split; diff --git a/packages/@rescript/runtime/lib/js/Belt_internalAVLset.cjs b/packages/@rescript/runtime/lib/js/Belt_internalAVLset.cjs index dc4a079e645..50626ea185f 100644 --- a/packages/@rescript/runtime/lib/js/Belt_internalAVLset.cjs +++ b/packages/@rescript/runtime/lib/js/Belt_internalAVLset.cjs @@ -100,12 +100,6 @@ function minimum(n) { } } -function minUndefined(n) { - if (n !== undefined) { - return min0Aux(n); - } -} - function max0Aux(_n) { while (true) { let n = _n; @@ -124,12 +118,6 @@ function maximum(n) { } } -function maxUndefined(n) { - if (n !== undefined) { - return max0Aux(n); - } -} - function removeMinAuxWithRef(n, v) { let ln = n.l; if (ln !== undefined) { @@ -350,7 +338,7 @@ function checkInvariantInternal(_v) { RE_EXN_ID: "Assert_failure", _1: [ "Belt_internalAVLset.res", - 292, + 280, 4 ], Error: new Error() @@ -668,22 +656,6 @@ function get(_n, x, cmp) { }; } -function getUndefined(_n, x, cmp) { - while (true) { - let n = _n; - if (n === undefined) { - return; - } - let v = n.v; - let c = cmp(x, v); - if (c === 0) { - return v; - } - _n = c < 0 ? n.l : n.r; - continue; - }; -} - function getOrThrow(_n, x, cmp) { while (true) { let n = _n; @@ -841,9 +813,7 @@ exports.create = create; exports.bal = bal; exports.singleton = singleton; exports.minimum = minimum; -exports.minUndefined = minUndefined; exports.maximum = maximum; -exports.maxUndefined = maxUndefined; exports.removeMinAuxWithRef = removeMinAuxWithRef; exports.isEmpty = isEmpty; exports.stackAllLeft = stackAllLeft; @@ -871,7 +841,6 @@ exports.cmp = cmp; exports.eq = eq; exports.subset = subset; exports.get = get; -exports.getUndefined = getUndefined; exports.getOrThrow = getOrThrow; exports.fromArray = fromArray; exports.addMutate = addMutate; diff --git a/packages/@rescript/runtime/lib/js/Belt_internalAVLtree.cjs b/packages/@rescript/runtime/lib/js/Belt_internalAVLtree.cjs index 6c2c8919249..1192eb13d88 100644 --- a/packages/@rescript/runtime/lib/js/Belt_internalAVLtree.cjs +++ b/packages/@rescript/runtime/lib/js/Belt_internalAVLtree.cjs @@ -122,12 +122,6 @@ function minKey(n) { } } -function minKeyUndefined(n) { - if (n !== undefined) { - return minKey0Aux(n); - } -} - function maxKey0Aux(_n) { while (true) { let n = _n; @@ -146,12 +140,6 @@ function maxKey(n) { } } -function maxKeyUndefined(n) { - if (n !== undefined) { - return maxKey0Aux(n); - } -} - function minKV0Aux(_n) { while (true) { let n = _n; @@ -173,12 +161,6 @@ function minimum(n) { } } -function minUndefined(n) { - if (n !== undefined) { - return minKV0Aux(n); - } -} - function maxKV0Aux(_n) { while (true) { let n = _n; @@ -200,12 +182,6 @@ function maximum(n) { } } -function maxUndefined(n) { - if (n !== undefined) { - return maxKV0Aux(n); - } -} - function removeMinAuxWithRef(n, kr, vr) { let ln = n.l; if (ln !== undefined) { @@ -542,7 +518,7 @@ function checkInvariantInternal(_v) { RE_EXN_ID: "Assert_failure", _1: [ "Belt_internalAVLtree.res", - 432, + 408, 4 ], Error: new Error() @@ -812,22 +788,6 @@ function get(_n, x, cmp) { }; } -function getUndefined(_n, x, cmp) { - while (true) { - let n = _n; - if (n === undefined) { - return; - } - let v = n.k; - let c = cmp(x, v); - if (c === 0) { - return n.v; - } - _n = c < 0 ? n.l : n.r; - continue; - }; -} - function getOrThrow(_n, x, cmp) { while (true) { let n = _n; @@ -1013,13 +973,9 @@ exports.bal = bal; exports.singleton = singleton; exports.updateValue = updateValue; exports.minKey = minKey; -exports.minKeyUndefined = minKeyUndefined; exports.maxKey = maxKey; -exports.maxKeyUndefined = maxKeyUndefined; exports.minimum = minimum; -exports.minUndefined = minUndefined; exports.maximum = maximum; -exports.maxUndefined = maxUndefined; exports.removeMinAuxWithRef = removeMinAuxWithRef; exports.isEmpty = isEmpty; exports.stackAllLeft = stackAllLeft; @@ -1050,7 +1006,6 @@ exports.fromSortedArrayUnsafe = fromSortedArrayUnsafe; exports.cmp = cmp; exports.eq = eq; exports.get = get; -exports.getUndefined = getUndefined; exports.getWithDefault = getWithDefault; exports.getOrThrow = getOrThrow; exports.has = has; diff --git a/packages/@rescript/runtime/lib/js/Belt_internalMapInt.cjs b/packages/@rescript/runtime/lib/js/Belt_internalMapInt.cjs index 54355b22528..1c09a9c4e1b 100644 --- a/packages/@rescript/runtime/lib/js/Belt_internalMapInt.cjs +++ b/packages/@rescript/runtime/lib/js/Belt_internalMapInt.cjs @@ -36,21 +36,6 @@ function get(_n, x) { }; } -function getUndefined(_n, x) { - while (true) { - let n = _n; - if (n === undefined) { - return; - } - let v = n.k; - if (x === v) { - return n.v; - } - _n = x < v ? n.l : n.r; - continue; - }; -} - function getOrThrow(_n, x) { while (true) { let n = _n; @@ -333,7 +318,6 @@ exports.A = A; exports.S = S; exports.add = add; exports.get = get; -exports.getUndefined = getUndefined; exports.getOrThrow = getOrThrow; exports.getWithDefault = getWithDefault; exports.has = has; diff --git a/packages/@rescript/runtime/lib/js/Belt_internalMapString.cjs b/packages/@rescript/runtime/lib/js/Belt_internalMapString.cjs index bb73f3a141c..1ff5fa3cb08 100644 --- a/packages/@rescript/runtime/lib/js/Belt_internalMapString.cjs +++ b/packages/@rescript/runtime/lib/js/Belt_internalMapString.cjs @@ -36,21 +36,6 @@ function get(_n, x) { }; } -function getUndefined(_n, x) { - while (true) { - let n = _n; - if (n === undefined) { - return; - } - let v = n.k; - if (x === v) { - return n.v; - } - _n = x < v ? n.l : n.r; - continue; - }; -} - function getOrThrow(_n, x) { while (true) { let n = _n; @@ -333,7 +318,6 @@ exports.A = A; exports.S = S; exports.add = add; exports.get = get; -exports.getUndefined = getUndefined; exports.getOrThrow = getOrThrow; exports.getWithDefault = getWithDefault; exports.has = has; diff --git a/packages/@rescript/runtime/lib/js/Belt_internalSetInt.cjs b/packages/@rescript/runtime/lib/js/Belt_internalSetInt.cjs index cf33c6f0805..37156dd7ced 100644 --- a/packages/@rescript/runtime/lib/js/Belt_internalSetInt.cjs +++ b/packages/@rescript/runtime/lib/js/Belt_internalSetInt.cjs @@ -115,21 +115,6 @@ function get(_n, x) { }; } -function getUndefined(_n, x) { - while (true) { - let n = _n; - if (n === undefined) { - return; - } - let v = n.v; - if (x === v) { - return v; - } - _n = x < v ? n.l : n.r; - continue; - }; -} - function getOrThrow(_n, x) { while (true) { let n = _n; @@ -200,7 +185,6 @@ exports.cmp = cmp; exports.eq = eq; exports.subset = subset; exports.get = get; -exports.getUndefined = getUndefined; exports.getOrThrow = getOrThrow; exports.addMutate = addMutate; exports.fromArray = fromArray; diff --git a/packages/@rescript/runtime/lib/js/Belt_internalSetString.cjs b/packages/@rescript/runtime/lib/js/Belt_internalSetString.cjs index 76e98bdc70a..15786f83f6c 100644 --- a/packages/@rescript/runtime/lib/js/Belt_internalSetString.cjs +++ b/packages/@rescript/runtime/lib/js/Belt_internalSetString.cjs @@ -115,21 +115,6 @@ function get(_n, x) { }; } -function getUndefined(_n, x) { - while (true) { - let n = _n; - if (n === undefined) { - return; - } - let v = n.v; - if (x === v) { - return v; - } - _n = x < v ? n.l : n.r; - continue; - }; -} - function getOrThrow(_n, x) { while (true) { let n = _n; @@ -200,7 +185,6 @@ exports.cmp = cmp; exports.eq = eq; exports.subset = subset; exports.get = get; -exports.getUndefined = getUndefined; exports.getOrThrow = getOrThrow; exports.addMutate = addMutate; exports.fromArray = fromArray; diff --git a/tests/analysis_tests/tests-reanalyze/deadcode/expected/deadcode.txt b/tests/analysis_tests/tests-reanalyze/deadcode/expected/deadcode.txt index 7d00a6a60fc..7ea5d1387e7 100644 --- a/tests/analysis_tests/tests-reanalyze/deadcode/expected/deadcode.txt +++ b/tests/analysis_tests/tests-reanalyze/deadcode/expected/deadcode.txt @@ -442,59 +442,58 @@ addValueDeclaration +get ImmutableArray.res:24:6 path:+ImmutableArray.Array addValueDeclaration +getExn ImmutableArray.res:26:6 path:+ImmutableArray.Array addValueDeclaration +getUnsafe ImmutableArray.res:28:6 path:+ImmutableArray.Array - addValueDeclaration +getUndefined ImmutableArray.res:30:6 path:+ImmutableArray.Array - addValueDeclaration +shuffle ImmutableArray.res:32:6 path:+ImmutableArray.Array - addValueDeclaration +reverse ImmutableArray.res:34:6 path:+ImmutableArray.Array - addValueDeclaration +makeUninitialized ImmutableArray.res:36:6 path:+ImmutableArray.Array - addValueDeclaration +makeUninitializedUnsafe ImmutableArray.res:38:6 path:+ImmutableArray.Array - addValueDeclaration +make ImmutableArray.res:40:6 path:+ImmutableArray.Array - addValueDeclaration +range ImmutableArray.res:42:6 path:+ImmutableArray.Array - addValueDeclaration +rangeBy ImmutableArray.res:44:6 path:+ImmutableArray.Array - addValueDeclaration +makeByU ImmutableArray.res:46:6 path:+ImmutableArray.Array - addValueDeclaration +makeBy ImmutableArray.res:47:6 path:+ImmutableArray.Array - addValueDeclaration +makeByAndShuffleU ImmutableArray.res:49:6 path:+ImmutableArray.Array - addValueDeclaration +makeByAndShuffle ImmutableArray.res:50:6 path:+ImmutableArray.Array - addValueDeclaration +zip ImmutableArray.res:52:6 path:+ImmutableArray.Array - addValueDeclaration +zipByU ImmutableArray.res:54:6 path:+ImmutableArray.Array - addValueDeclaration +zipBy ImmutableArray.res:55:6 path:+ImmutableArray.Array - addValueDeclaration +unzip ImmutableArray.res:57:6 path:+ImmutableArray.Array - addValueDeclaration +concat ImmutableArray.res:59:6 path:+ImmutableArray.Array - addValueDeclaration +concatMany ImmutableArray.res:61:6 path:+ImmutableArray.Array - addValueDeclaration +slice ImmutableArray.res:63:6 path:+ImmutableArray.Array - addValueDeclaration +sliceToEnd ImmutableArray.res:65:6 path:+ImmutableArray.Array - addValueDeclaration +copy ImmutableArray.res:67:6 path:+ImmutableArray.Array - addValueDeclaration +forEachU ImmutableArray.res:69:6 path:+ImmutableArray.Array - addValueDeclaration +forEach ImmutableArray.res:70:6 path:+ImmutableArray.Array - addValueDeclaration +mapU ImmutableArray.res:72:6 path:+ImmutableArray.Array - addValueDeclaration +map ImmutableArray.res:73:6 path:+ImmutableArray.Array - addValueDeclaration +keepWithIndexU ImmutableArray.res:75:6 path:+ImmutableArray.Array - addValueDeclaration +keepWithIndex ImmutableArray.res:76:6 path:+ImmutableArray.Array - addValueDeclaration +keepMapU ImmutableArray.res:78:6 path:+ImmutableArray.Array - addValueDeclaration +keepMap ImmutableArray.res:79:6 path:+ImmutableArray.Array - addValueDeclaration +forEachWithIndexU ImmutableArray.res:81:6 path:+ImmutableArray.Array - addValueDeclaration +forEachWithIndex ImmutableArray.res:82:6 path:+ImmutableArray.Array - addValueDeclaration +mapWithIndexU ImmutableArray.res:84:6 path:+ImmutableArray.Array - addValueDeclaration +mapWithIndex ImmutableArray.res:85:6 path:+ImmutableArray.Array - addValueDeclaration +partitionU ImmutableArray.res:87:6 path:+ImmutableArray.Array - addValueDeclaration +partition ImmutableArray.res:88:6 path:+ImmutableArray.Array - addValueDeclaration +reduceU ImmutableArray.res:90:6 path:+ImmutableArray.Array - addValueDeclaration +reduce ImmutableArray.res:91:6 path:+ImmutableArray.Array - addValueDeclaration +reduceReverseU ImmutableArray.res:93:6 path:+ImmutableArray.Array - addValueDeclaration +reduceReverse ImmutableArray.res:94:6 path:+ImmutableArray.Array - addValueDeclaration +reduceReverse2U ImmutableArray.res:96:6 path:+ImmutableArray.Array - addValueDeclaration +reduceReverse2 ImmutableArray.res:97:6 path:+ImmutableArray.Array - addValueDeclaration +someU ImmutableArray.res:99:6 path:+ImmutableArray.Array - addValueDeclaration +some ImmutableArray.res:100:6 path:+ImmutableArray.Array - addValueDeclaration +everyU ImmutableArray.res:102:6 path:+ImmutableArray.Array - addValueDeclaration +every ImmutableArray.res:103:6 path:+ImmutableArray.Array - addValueDeclaration +every2U ImmutableArray.res:105:6 path:+ImmutableArray.Array - addValueDeclaration +every2 ImmutableArray.res:106:6 path:+ImmutableArray.Array - addValueDeclaration +some2U ImmutableArray.res:108:6 path:+ImmutableArray.Array - addValueDeclaration +some2 ImmutableArray.res:109:6 path:+ImmutableArray.Array - addValueDeclaration +cmpU ImmutableArray.res:111:6 path:+ImmutableArray.Array - addValueDeclaration +cmp ImmutableArray.res:112:6 path:+ImmutableArray.Array - addValueDeclaration +eqU ImmutableArray.res:114:6 path:+ImmutableArray.Array - addValueDeclaration +eq ImmutableArray.res:115:6 path:+ImmutableArray.Array + addValueDeclaration +shuffle ImmutableArray.res:30:6 path:+ImmutableArray.Array + addValueDeclaration +reverse ImmutableArray.res:32:6 path:+ImmutableArray.Array + addValueDeclaration +makeUninitialized ImmutableArray.res:34:6 path:+ImmutableArray.Array + addValueDeclaration +makeUninitializedUnsafe ImmutableArray.res:36:6 path:+ImmutableArray.Array + addValueDeclaration +make ImmutableArray.res:38:6 path:+ImmutableArray.Array + addValueDeclaration +range ImmutableArray.res:40:6 path:+ImmutableArray.Array + addValueDeclaration +rangeBy ImmutableArray.res:42:6 path:+ImmutableArray.Array + addValueDeclaration +makeByU ImmutableArray.res:44:6 path:+ImmutableArray.Array + addValueDeclaration +makeBy ImmutableArray.res:45:6 path:+ImmutableArray.Array + addValueDeclaration +makeByAndShuffleU ImmutableArray.res:47:6 path:+ImmutableArray.Array + addValueDeclaration +makeByAndShuffle ImmutableArray.res:48:6 path:+ImmutableArray.Array + addValueDeclaration +zip ImmutableArray.res:50:6 path:+ImmutableArray.Array + addValueDeclaration +zipByU ImmutableArray.res:52:6 path:+ImmutableArray.Array + addValueDeclaration +zipBy ImmutableArray.res:53:6 path:+ImmutableArray.Array + addValueDeclaration +unzip ImmutableArray.res:55:6 path:+ImmutableArray.Array + addValueDeclaration +concat ImmutableArray.res:57:6 path:+ImmutableArray.Array + addValueDeclaration +concatMany ImmutableArray.res:59:6 path:+ImmutableArray.Array + addValueDeclaration +slice ImmutableArray.res:61:6 path:+ImmutableArray.Array + addValueDeclaration +sliceToEnd ImmutableArray.res:63:6 path:+ImmutableArray.Array + addValueDeclaration +copy ImmutableArray.res:65:6 path:+ImmutableArray.Array + addValueDeclaration +forEachU ImmutableArray.res:67:6 path:+ImmutableArray.Array + addValueDeclaration +forEach ImmutableArray.res:68:6 path:+ImmutableArray.Array + addValueDeclaration +mapU ImmutableArray.res:70:6 path:+ImmutableArray.Array + addValueDeclaration +map ImmutableArray.res:71:6 path:+ImmutableArray.Array + addValueDeclaration +keepWithIndexU ImmutableArray.res:73:6 path:+ImmutableArray.Array + addValueDeclaration +keepWithIndex ImmutableArray.res:74:6 path:+ImmutableArray.Array + addValueDeclaration +keepMapU ImmutableArray.res:76:6 path:+ImmutableArray.Array + addValueDeclaration +keepMap ImmutableArray.res:77:6 path:+ImmutableArray.Array + addValueDeclaration +forEachWithIndexU ImmutableArray.res:79:6 path:+ImmutableArray.Array + addValueDeclaration +forEachWithIndex ImmutableArray.res:80:6 path:+ImmutableArray.Array + addValueDeclaration +mapWithIndexU ImmutableArray.res:82:6 path:+ImmutableArray.Array + addValueDeclaration +mapWithIndex ImmutableArray.res:83:6 path:+ImmutableArray.Array + addValueDeclaration +partitionU ImmutableArray.res:85:6 path:+ImmutableArray.Array + addValueDeclaration +partition ImmutableArray.res:86:6 path:+ImmutableArray.Array + addValueDeclaration +reduceU ImmutableArray.res:88:6 path:+ImmutableArray.Array + addValueDeclaration +reduce ImmutableArray.res:89:6 path:+ImmutableArray.Array + addValueDeclaration +reduceReverseU ImmutableArray.res:91:6 path:+ImmutableArray.Array + addValueDeclaration +reduceReverse ImmutableArray.res:92:6 path:+ImmutableArray.Array + addValueDeclaration +reduceReverse2U ImmutableArray.res:94:6 path:+ImmutableArray.Array + addValueDeclaration +reduceReverse2 ImmutableArray.res:95:6 path:+ImmutableArray.Array + addValueDeclaration +someU ImmutableArray.res:97:6 path:+ImmutableArray.Array + addValueDeclaration +some ImmutableArray.res:98:6 path:+ImmutableArray.Array + addValueDeclaration +everyU ImmutableArray.res:100:6 path:+ImmutableArray.Array + addValueDeclaration +every ImmutableArray.res:101:6 path:+ImmutableArray.Array + addValueDeclaration +every2U ImmutableArray.res:103:6 path:+ImmutableArray.Array + addValueDeclaration +every2 ImmutableArray.res:104:6 path:+ImmutableArray.Array + addValueDeclaration +some2U ImmutableArray.res:106:6 path:+ImmutableArray.Array + addValueDeclaration +some2 ImmutableArray.res:107:6 path:+ImmutableArray.Array + addValueDeclaration +cmpU ImmutableArray.res:109:6 path:+ImmutableArray.Array + addValueDeclaration +cmp ImmutableArray.res:110:6 path:+ImmutableArray.Array + addValueDeclaration +eqU ImmutableArray.res:112:6 path:+ImmutableArray.Array + addValueDeclaration +eq ImmutableArray.res:113:6 path:+ImmutableArray.Array addValueDeclaration +fromArray ImmutableArray.res:14:6 path:+ImmutableArray addValueDeclaration +toArray ImmutableArray.res:16:6 path:+ImmutableArray addValueDeclaration +length ImmutableArray.res:20:6 path:+ImmutableArray @@ -502,59 +501,58 @@ addValueDeclaration +get ImmutableArray.res:24:6 path:+ImmutableArray addValueDeclaration +getExn ImmutableArray.res:26:6 path:+ImmutableArray addValueDeclaration +getUnsafe ImmutableArray.res:28:6 path:+ImmutableArray - addValueDeclaration +getUndefined ImmutableArray.res:30:6 path:+ImmutableArray - addValueDeclaration +shuffle ImmutableArray.res:32:6 path:+ImmutableArray - addValueDeclaration +reverse ImmutableArray.res:34:6 path:+ImmutableArray - addValueDeclaration +makeUninitialized ImmutableArray.res:36:6 path:+ImmutableArray - addValueDeclaration +makeUninitializedUnsafe ImmutableArray.res:38:6 path:+ImmutableArray - addValueDeclaration +make ImmutableArray.res:40:6 path:+ImmutableArray - addValueDeclaration +range ImmutableArray.res:42:6 path:+ImmutableArray - addValueDeclaration +rangeBy ImmutableArray.res:44:6 path:+ImmutableArray - addValueDeclaration +makeByU ImmutableArray.res:46:6 path:+ImmutableArray - addValueDeclaration +makeBy ImmutableArray.res:47:6 path:+ImmutableArray - addValueDeclaration +makeByAndShuffleU ImmutableArray.res:49:6 path:+ImmutableArray - addValueDeclaration +makeByAndShuffle ImmutableArray.res:50:6 path:+ImmutableArray - addValueDeclaration +zip ImmutableArray.res:52:6 path:+ImmutableArray - addValueDeclaration +zipByU ImmutableArray.res:54:6 path:+ImmutableArray - addValueDeclaration +zipBy ImmutableArray.res:55:6 path:+ImmutableArray - addValueDeclaration +unzip ImmutableArray.res:57:6 path:+ImmutableArray - addValueDeclaration +concat ImmutableArray.res:59:6 path:+ImmutableArray - addValueDeclaration +concatMany ImmutableArray.res:61:6 path:+ImmutableArray - addValueDeclaration +slice ImmutableArray.res:63:6 path:+ImmutableArray - addValueDeclaration +sliceToEnd ImmutableArray.res:65:6 path:+ImmutableArray - addValueDeclaration +copy ImmutableArray.res:67:6 path:+ImmutableArray - addValueDeclaration +forEachU ImmutableArray.res:69:6 path:+ImmutableArray - addValueDeclaration +forEach ImmutableArray.res:70:6 path:+ImmutableArray - addValueDeclaration +mapU ImmutableArray.res:72:6 path:+ImmutableArray - addValueDeclaration +map ImmutableArray.res:73:6 path:+ImmutableArray - addValueDeclaration +keepWithIndexU ImmutableArray.res:75:6 path:+ImmutableArray - addValueDeclaration +keepWithIndex ImmutableArray.res:76:6 path:+ImmutableArray - addValueDeclaration +keepMapU ImmutableArray.res:78:6 path:+ImmutableArray - addValueDeclaration +keepMap ImmutableArray.res:79:6 path:+ImmutableArray - addValueDeclaration +forEachWithIndexU ImmutableArray.res:81:6 path:+ImmutableArray - addValueDeclaration +forEachWithIndex ImmutableArray.res:82:6 path:+ImmutableArray - addValueDeclaration +mapWithIndexU ImmutableArray.res:84:6 path:+ImmutableArray - addValueDeclaration +mapWithIndex ImmutableArray.res:85:6 path:+ImmutableArray - addValueDeclaration +partitionU ImmutableArray.res:87:6 path:+ImmutableArray - addValueDeclaration +partition ImmutableArray.res:88:6 path:+ImmutableArray - addValueDeclaration +reduceU ImmutableArray.res:90:6 path:+ImmutableArray - addValueDeclaration +reduce ImmutableArray.res:91:6 path:+ImmutableArray - addValueDeclaration +reduceReverseU ImmutableArray.res:93:6 path:+ImmutableArray - addValueDeclaration +reduceReverse ImmutableArray.res:94:6 path:+ImmutableArray - addValueDeclaration +reduceReverse2U ImmutableArray.res:96:6 path:+ImmutableArray - addValueDeclaration +reduceReverse2 ImmutableArray.res:97:6 path:+ImmutableArray - addValueDeclaration +someU ImmutableArray.res:99:6 path:+ImmutableArray - addValueDeclaration +some ImmutableArray.res:100:6 path:+ImmutableArray - addValueDeclaration +everyU ImmutableArray.res:102:6 path:+ImmutableArray - addValueDeclaration +every ImmutableArray.res:103:6 path:+ImmutableArray - addValueDeclaration +every2U ImmutableArray.res:105:6 path:+ImmutableArray - addValueDeclaration +every2 ImmutableArray.res:106:6 path:+ImmutableArray - addValueDeclaration +some2U ImmutableArray.res:108:6 path:+ImmutableArray - addValueDeclaration +some2 ImmutableArray.res:109:6 path:+ImmutableArray - addValueDeclaration +cmpU ImmutableArray.res:111:6 path:+ImmutableArray - addValueDeclaration +cmp ImmutableArray.res:112:6 path:+ImmutableArray - addValueDeclaration +eqU ImmutableArray.res:114:6 path:+ImmutableArray - addValueDeclaration +eq ImmutableArray.res:115:6 path:+ImmutableArray + addValueDeclaration +shuffle ImmutableArray.res:30:6 path:+ImmutableArray + addValueDeclaration +reverse ImmutableArray.res:32:6 path:+ImmutableArray + addValueDeclaration +makeUninitialized ImmutableArray.res:34:6 path:+ImmutableArray + addValueDeclaration +makeUninitializedUnsafe ImmutableArray.res:36:6 path:+ImmutableArray + addValueDeclaration +make ImmutableArray.res:38:6 path:+ImmutableArray + addValueDeclaration +range ImmutableArray.res:40:6 path:+ImmutableArray + addValueDeclaration +rangeBy ImmutableArray.res:42:6 path:+ImmutableArray + addValueDeclaration +makeByU ImmutableArray.res:44:6 path:+ImmutableArray + addValueDeclaration +makeBy ImmutableArray.res:45:6 path:+ImmutableArray + addValueDeclaration +makeByAndShuffleU ImmutableArray.res:47:6 path:+ImmutableArray + addValueDeclaration +makeByAndShuffle ImmutableArray.res:48:6 path:+ImmutableArray + addValueDeclaration +zip ImmutableArray.res:50:6 path:+ImmutableArray + addValueDeclaration +zipByU ImmutableArray.res:52:6 path:+ImmutableArray + addValueDeclaration +zipBy ImmutableArray.res:53:6 path:+ImmutableArray + addValueDeclaration +unzip ImmutableArray.res:55:6 path:+ImmutableArray + addValueDeclaration +concat ImmutableArray.res:57:6 path:+ImmutableArray + addValueDeclaration +concatMany ImmutableArray.res:59:6 path:+ImmutableArray + addValueDeclaration +slice ImmutableArray.res:61:6 path:+ImmutableArray + addValueDeclaration +sliceToEnd ImmutableArray.res:63:6 path:+ImmutableArray + addValueDeclaration +copy ImmutableArray.res:65:6 path:+ImmutableArray + addValueDeclaration +forEachU ImmutableArray.res:67:6 path:+ImmutableArray + addValueDeclaration +forEach ImmutableArray.res:68:6 path:+ImmutableArray + addValueDeclaration +mapU ImmutableArray.res:70:6 path:+ImmutableArray + addValueDeclaration +map ImmutableArray.res:71:6 path:+ImmutableArray + addValueDeclaration +keepWithIndexU ImmutableArray.res:73:6 path:+ImmutableArray + addValueDeclaration +keepWithIndex ImmutableArray.res:74:6 path:+ImmutableArray + addValueDeclaration +keepMapU ImmutableArray.res:76:6 path:+ImmutableArray + addValueDeclaration +keepMap ImmutableArray.res:77:6 path:+ImmutableArray + addValueDeclaration +forEachWithIndexU ImmutableArray.res:79:6 path:+ImmutableArray + addValueDeclaration +forEachWithIndex ImmutableArray.res:80:6 path:+ImmutableArray + addValueDeclaration +mapWithIndexU ImmutableArray.res:82:6 path:+ImmutableArray + addValueDeclaration +mapWithIndex ImmutableArray.res:83:6 path:+ImmutableArray + addValueDeclaration +partitionU ImmutableArray.res:85:6 path:+ImmutableArray + addValueDeclaration +partition ImmutableArray.res:86:6 path:+ImmutableArray + addValueDeclaration +reduceU ImmutableArray.res:88:6 path:+ImmutableArray + addValueDeclaration +reduce ImmutableArray.res:89:6 path:+ImmutableArray + addValueDeclaration +reduceReverseU ImmutableArray.res:91:6 path:+ImmutableArray + addValueDeclaration +reduceReverse ImmutableArray.res:92:6 path:+ImmutableArray + addValueDeclaration +reduceReverse2U ImmutableArray.res:94:6 path:+ImmutableArray + addValueDeclaration +reduceReverse2 ImmutableArray.res:95:6 path:+ImmutableArray + addValueDeclaration +someU ImmutableArray.res:97:6 path:+ImmutableArray + addValueDeclaration +some ImmutableArray.res:98:6 path:+ImmutableArray + addValueDeclaration +everyU ImmutableArray.res:100:6 path:+ImmutableArray + addValueDeclaration +every ImmutableArray.res:101:6 path:+ImmutableArray + addValueDeclaration +every2U ImmutableArray.res:103:6 path:+ImmutableArray + addValueDeclaration +every2 ImmutableArray.res:104:6 path:+ImmutableArray + addValueDeclaration +some2U ImmutableArray.res:106:6 path:+ImmutableArray + addValueDeclaration +some2 ImmutableArray.res:107:6 path:+ImmutableArray + addValueDeclaration +cmpU ImmutableArray.res:109:6 path:+ImmutableArray + addValueDeclaration +cmp ImmutableArray.res:110:6 path:+ImmutableArray + addValueDeclaration +eqU ImmutableArray.res:112:6 path:+ImmutableArray + addValueDeclaration +eq ImmutableArray.res:113:6 path:+ImmutableArray addValueReference ImmutableArray.res:14:6 --> ImmutableArray.res:14:18 addValueReference ImmutableArray.res:14:6 --> ImmutableArray.res:8:2 addValueReference ImmutableArray.res:16:6 --> ImmutableArray.res:16:16 @@ -572,213 +570,210 @@ addValueReference ImmutableArray.res:28:6 --> ImmutableArray.res:28:19 addValueReference ImmutableArray.res:28:6 --> ImmutableArray.res:5:2 addValueReference ImmutableArray.res:28:6 --> ImmutableArray.res:28:22 - addValueReference ImmutableArray.res:30:6 --> ImmutableArray.res:30:22 + addValueReference ImmutableArray.res:30:6 --> ImmutableArray.res:30:16 addValueReference ImmutableArray.res:30:6 --> ImmutableArray.res:5:2 - addValueReference ImmutableArray.res:30:6 --> ImmutableArray.res:30:25 + addValueReference ImmutableArray.res:30:6 --> ImmutableArray.res:8:2 addValueReference ImmutableArray.res:32:6 --> ImmutableArray.res:32:16 addValueReference ImmutableArray.res:32:6 --> ImmutableArray.res:5:2 addValueReference ImmutableArray.res:32:6 --> ImmutableArray.res:8:2 - addValueReference ImmutableArray.res:34:6 --> ImmutableArray.res:34:16 - addValueReference ImmutableArray.res:34:6 --> ImmutableArray.res:5:2 + addValueReference ImmutableArray.res:34:6 --> ImmutableArray.res:34:26 addValueReference ImmutableArray.res:34:6 --> ImmutableArray.res:8:2 - addValueReference ImmutableArray.res:36:6 --> ImmutableArray.res:36:26 + addValueReference ImmutableArray.res:36:6 --> ImmutableArray.res:36:32 addValueReference ImmutableArray.res:36:6 --> ImmutableArray.res:8:2 - addValueReference ImmutableArray.res:38:6 --> ImmutableArray.res:38:32 + addValueReference ImmutableArray.res:38:6 --> ImmutableArray.res:38:14 + addValueReference ImmutableArray.res:38:6 --> ImmutableArray.res:38:17 addValueReference ImmutableArray.res:38:6 --> ImmutableArray.res:8:2 - addValueReference ImmutableArray.res:40:6 --> ImmutableArray.res:40:14 - addValueReference ImmutableArray.res:40:6 --> ImmutableArray.res:40:17 + addValueReference ImmutableArray.res:40:6 --> ImmutableArray.res:40:15 + addValueReference ImmutableArray.res:40:6 --> ImmutableArray.res:40:18 addValueReference ImmutableArray.res:40:6 --> ImmutableArray.res:8:2 - addValueReference ImmutableArray.res:42:6 --> ImmutableArray.res:42:15 - addValueReference ImmutableArray.res:42:6 --> ImmutableArray.res:42:18 + addValueReference ImmutableArray.res:42:6 --> ImmutableArray.res:42:17 + addValueReference ImmutableArray.res:42:6 --> ImmutableArray.res:42:20 + addValueReference ImmutableArray.res:42:6 --> ImmutableArray.res:42:23 addValueReference ImmutableArray.res:42:6 --> ImmutableArray.res:8:2 addValueReference ImmutableArray.res:44:6 --> ImmutableArray.res:44:17 addValueReference ImmutableArray.res:44:6 --> ImmutableArray.res:44:20 - addValueReference ImmutableArray.res:44:6 --> ImmutableArray.res:44:23 addValueReference ImmutableArray.res:44:6 --> ImmutableArray.res:8:2 - addValueReference ImmutableArray.res:46:6 --> ImmutableArray.res:46:17 - addValueReference ImmutableArray.res:46:6 --> ImmutableArray.res:46:20 - addValueReference ImmutableArray.res:46:6 --> ImmutableArray.res:8:2 - addValueReference ImmutableArray.res:47:6 --> ImmutableArray.res:47:16 - addValueReference ImmutableArray.res:47:6 --> ImmutableArray.res:47:19 + addValueReference ImmutableArray.res:45:6 --> ImmutableArray.res:45:16 + addValueReference ImmutableArray.res:45:6 --> ImmutableArray.res:45:19 + addValueReference ImmutableArray.res:45:6 --> ImmutableArray.res:8:2 + addValueReference ImmutableArray.res:47:6 --> ImmutableArray.res:47:27 + addValueReference ImmutableArray.res:47:6 --> ImmutableArray.res:47:30 addValueReference ImmutableArray.res:47:6 --> ImmutableArray.res:8:2 - addValueReference ImmutableArray.res:49:6 --> ImmutableArray.res:49:27 - addValueReference ImmutableArray.res:49:6 --> ImmutableArray.res:49:30 - addValueReference ImmutableArray.res:49:6 --> ImmutableArray.res:8:2 - addValueReference ImmutableArray.res:50:6 --> ImmutableArray.res:50:26 - addValueReference ImmutableArray.res:50:6 --> ImmutableArray.res:50:29 - addValueReference ImmutableArray.res:50:6 --> ImmutableArray.res:8:2 - addValueReference ImmutableArray.res:52:6 --> ImmutableArray.res:52:13 + addValueReference ImmutableArray.res:48:6 --> ImmutableArray.res:48:26 + addValueReference ImmutableArray.res:48:6 --> ImmutableArray.res:48:29 + addValueReference ImmutableArray.res:48:6 --> ImmutableArray.res:8:2 + addValueReference ImmutableArray.res:50:6 --> ImmutableArray.res:50:13 + addValueReference ImmutableArray.res:50:6 --> ImmutableArray.res:5:2 + addValueReference ImmutableArray.res:50:6 --> ImmutableArray.res:50:17 + addValueReference ImmutableArray.res:50:6 --> ImmutableArray.res:5:2 + addValueReference ImmutableArray.res:50:6 --> ImmutableArray.res:9:2 + addValueReference ImmutableArray.res:52:6 --> ImmutableArray.res:52:16 addValueReference ImmutableArray.res:52:6 --> ImmutableArray.res:5:2 - addValueReference ImmutableArray.res:52:6 --> ImmutableArray.res:52:17 + addValueReference ImmutableArray.res:52:6 --> ImmutableArray.res:52:20 addValueReference ImmutableArray.res:52:6 --> ImmutableArray.res:5:2 - addValueReference ImmutableArray.res:52:6 --> ImmutableArray.res:9:2 - addValueReference ImmutableArray.res:54:6 --> ImmutableArray.res:54:16 - addValueReference ImmutableArray.res:54:6 --> ImmutableArray.res:5:2 - addValueReference ImmutableArray.res:54:6 --> ImmutableArray.res:54:20 - addValueReference ImmutableArray.res:54:6 --> ImmutableArray.res:5:2 - addValueReference ImmutableArray.res:54:6 --> ImmutableArray.res:54:24 - addValueReference ImmutableArray.res:54:6 --> ImmutableArray.res:8:2 - addValueReference ImmutableArray.res:55:6 --> ImmutableArray.res:55:15 - addValueReference ImmutableArray.res:55:6 --> ImmutableArray.res:5:2 - addValueReference ImmutableArray.res:55:6 --> ImmutableArray.res:55:19 - addValueReference ImmutableArray.res:55:6 --> ImmutableArray.res:5:2 - addValueReference ImmutableArray.res:55:6 --> ImmutableArray.res:55:23 - addValueReference ImmutableArray.res:55:6 --> ImmutableArray.res:8:2 - addValueReference ImmutableArray.res:57:6 --> ImmutableArray.res:57:14 - addValueReference ImmutableArray.res:57:6 --> ImmutableArray.res:6:2 - addValueReference ImmutableArray.res:57:6 --> ImmutableArray.res:10:2 - addValueReference ImmutableArray.res:59:6 --> ImmutableArray.res:59:16 - addValueReference ImmutableArray.res:59:6 --> ImmutableArray.res:5:2 + addValueReference ImmutableArray.res:52:6 --> ImmutableArray.res:52:24 + addValueReference ImmutableArray.res:52:6 --> ImmutableArray.res:8:2 + addValueReference ImmutableArray.res:53:6 --> ImmutableArray.res:53:15 + addValueReference ImmutableArray.res:53:6 --> ImmutableArray.res:5:2 + addValueReference ImmutableArray.res:53:6 --> ImmutableArray.res:53:19 + addValueReference ImmutableArray.res:53:6 --> ImmutableArray.res:5:2 + addValueReference ImmutableArray.res:53:6 --> ImmutableArray.res:53:23 + addValueReference ImmutableArray.res:53:6 --> ImmutableArray.res:8:2 + addValueReference ImmutableArray.res:55:6 --> ImmutableArray.res:55:14 + addValueReference ImmutableArray.res:55:6 --> ImmutableArray.res:6:2 + addValueReference ImmutableArray.res:55:6 --> ImmutableArray.res:10:2 + addValueReference ImmutableArray.res:57:6 --> ImmutableArray.res:57:16 + addValueReference ImmutableArray.res:57:6 --> ImmutableArray.res:5:2 + addValueReference ImmutableArray.res:57:6 --> ImmutableArray.res:57:20 + addValueReference ImmutableArray.res:57:6 --> ImmutableArray.res:5:2 + addValueReference ImmutableArray.res:57:6 --> ImmutableArray.res:8:2 addValueReference ImmutableArray.res:59:6 --> ImmutableArray.res:59:20 - addValueReference ImmutableArray.res:59:6 --> ImmutableArray.res:5:2 + addValueReference ImmutableArray.res:59:6 --> ImmutableArray.res:7:2 addValueReference ImmutableArray.res:59:6 --> ImmutableArray.res:8:2 - addValueReference ImmutableArray.res:61:6 --> ImmutableArray.res:61:20 - addValueReference ImmutableArray.res:61:6 --> ImmutableArray.res:7:2 + addValueReference ImmutableArray.res:61:6 --> ImmutableArray.res:61:15 + addValueReference ImmutableArray.res:61:6 --> ImmutableArray.res:5:2 + addValueReference ImmutableArray.res:61:6 --> ImmutableArray.res:61:18 + addValueReference ImmutableArray.res:61:6 --> ImmutableArray.res:61:27 addValueReference ImmutableArray.res:61:6 --> ImmutableArray.res:8:2 - addValueReference ImmutableArray.res:63:6 --> ImmutableArray.res:63:15 + addValueReference ImmutableArray.res:63:6 --> ImmutableArray.res:63:20 addValueReference ImmutableArray.res:63:6 --> ImmutableArray.res:5:2 - addValueReference ImmutableArray.res:63:6 --> ImmutableArray.res:63:18 - addValueReference ImmutableArray.res:63:6 --> ImmutableArray.res:63:27 + addValueReference ImmutableArray.res:63:6 --> ImmutableArray.res:63:23 addValueReference ImmutableArray.res:63:6 --> ImmutableArray.res:8:2 - addValueReference ImmutableArray.res:65:6 --> ImmutableArray.res:65:20 + addValueReference ImmutableArray.res:65:6 --> ImmutableArray.res:65:13 addValueReference ImmutableArray.res:65:6 --> ImmutableArray.res:5:2 - addValueReference ImmutableArray.res:65:6 --> ImmutableArray.res:65:23 addValueReference ImmutableArray.res:65:6 --> ImmutableArray.res:8:2 - addValueReference ImmutableArray.res:67:6 --> ImmutableArray.res:67:13 + addValueReference ImmutableArray.res:67:6 --> ImmutableArray.res:67:18 addValueReference ImmutableArray.res:67:6 --> ImmutableArray.res:5:2 - addValueReference ImmutableArray.res:67:6 --> ImmutableArray.res:8:2 - addValueReference ImmutableArray.res:69:6 --> ImmutableArray.res:69:18 - addValueReference ImmutableArray.res:69:6 --> ImmutableArray.res:5:2 - addValueReference ImmutableArray.res:69:6 --> ImmutableArray.res:69:21 - addValueReference ImmutableArray.res:70:6 --> ImmutableArray.res:70:17 + addValueReference ImmutableArray.res:67:6 --> ImmutableArray.res:67:21 + addValueReference ImmutableArray.res:68:6 --> ImmutableArray.res:68:17 + addValueReference ImmutableArray.res:68:6 --> ImmutableArray.res:5:2 + addValueReference ImmutableArray.res:68:6 --> ImmutableArray.res:68:20 + addValueReference ImmutableArray.res:70:6 --> ImmutableArray.res:70:14 addValueReference ImmutableArray.res:70:6 --> ImmutableArray.res:5:2 - addValueReference ImmutableArray.res:70:6 --> ImmutableArray.res:70:20 - addValueReference ImmutableArray.res:72:6 --> ImmutableArray.res:72:14 - addValueReference ImmutableArray.res:72:6 --> ImmutableArray.res:5:2 - addValueReference ImmutableArray.res:72:6 --> ImmutableArray.res:72:17 - addValueReference ImmutableArray.res:72:6 --> ImmutableArray.res:8:2 - addValueReference ImmutableArray.res:73:6 --> ImmutableArray.res:73:13 + addValueReference ImmutableArray.res:70:6 --> ImmutableArray.res:70:17 + addValueReference ImmutableArray.res:70:6 --> ImmutableArray.res:8:2 + addValueReference ImmutableArray.res:71:6 --> ImmutableArray.res:71:13 + addValueReference ImmutableArray.res:71:6 --> ImmutableArray.res:5:2 + addValueReference ImmutableArray.res:71:6 --> ImmutableArray.res:71:16 + addValueReference ImmutableArray.res:71:6 --> ImmutableArray.res:8:2 + addValueReference ImmutableArray.res:73:6 --> ImmutableArray.res:73:24 addValueReference ImmutableArray.res:73:6 --> ImmutableArray.res:5:2 - addValueReference ImmutableArray.res:73:6 --> ImmutableArray.res:73:16 + addValueReference ImmutableArray.res:73:6 --> ImmutableArray.res:73:27 addValueReference ImmutableArray.res:73:6 --> ImmutableArray.res:8:2 - addValueReference ImmutableArray.res:75:6 --> ImmutableArray.res:75:24 - addValueReference ImmutableArray.res:75:6 --> ImmutableArray.res:5:2 - addValueReference ImmutableArray.res:75:6 --> ImmutableArray.res:75:27 - addValueReference ImmutableArray.res:75:6 --> ImmutableArray.res:8:2 - addValueReference ImmutableArray.res:76:6 --> ImmutableArray.res:76:23 + addValueReference ImmutableArray.res:74:6 --> ImmutableArray.res:74:23 + addValueReference ImmutableArray.res:74:6 --> ImmutableArray.res:5:2 + addValueReference ImmutableArray.res:74:6 --> ImmutableArray.res:74:26 + addValueReference ImmutableArray.res:74:6 --> ImmutableArray.res:8:2 + addValueReference ImmutableArray.res:76:6 --> ImmutableArray.res:76:18 addValueReference ImmutableArray.res:76:6 --> ImmutableArray.res:5:2 - addValueReference ImmutableArray.res:76:6 --> ImmutableArray.res:76:26 + addValueReference ImmutableArray.res:76:6 --> ImmutableArray.res:76:21 addValueReference ImmutableArray.res:76:6 --> ImmutableArray.res:8:2 - addValueReference ImmutableArray.res:78:6 --> ImmutableArray.res:78:18 - addValueReference ImmutableArray.res:78:6 --> ImmutableArray.res:5:2 - addValueReference ImmutableArray.res:78:6 --> ImmutableArray.res:78:21 - addValueReference ImmutableArray.res:78:6 --> ImmutableArray.res:8:2 - addValueReference ImmutableArray.res:79:6 --> ImmutableArray.res:79:17 + addValueReference ImmutableArray.res:77:6 --> ImmutableArray.res:77:17 + addValueReference ImmutableArray.res:77:6 --> ImmutableArray.res:5:2 + addValueReference ImmutableArray.res:77:6 --> ImmutableArray.res:77:20 + addValueReference ImmutableArray.res:77:6 --> ImmutableArray.res:8:2 + addValueReference ImmutableArray.res:79:6 --> ImmutableArray.res:79:27 addValueReference ImmutableArray.res:79:6 --> ImmutableArray.res:5:2 - addValueReference ImmutableArray.res:79:6 --> ImmutableArray.res:79:20 - addValueReference ImmutableArray.res:79:6 --> ImmutableArray.res:8:2 - addValueReference ImmutableArray.res:81:6 --> ImmutableArray.res:81:27 - addValueReference ImmutableArray.res:81:6 --> ImmutableArray.res:5:2 - addValueReference ImmutableArray.res:81:6 --> ImmutableArray.res:81:30 - addValueReference ImmutableArray.res:82:6 --> ImmutableArray.res:82:26 + addValueReference ImmutableArray.res:79:6 --> ImmutableArray.res:79:30 + addValueReference ImmutableArray.res:80:6 --> ImmutableArray.res:80:26 + addValueReference ImmutableArray.res:80:6 --> ImmutableArray.res:5:2 + addValueReference ImmutableArray.res:80:6 --> ImmutableArray.res:80:29 + addValueReference ImmutableArray.res:82:6 --> ImmutableArray.res:82:23 addValueReference ImmutableArray.res:82:6 --> ImmutableArray.res:5:2 - addValueReference ImmutableArray.res:82:6 --> ImmutableArray.res:82:29 - addValueReference ImmutableArray.res:84:6 --> ImmutableArray.res:84:23 - addValueReference ImmutableArray.res:84:6 --> ImmutableArray.res:5:2 - addValueReference ImmutableArray.res:84:6 --> ImmutableArray.res:84:26 - addValueReference ImmutableArray.res:84:6 --> ImmutableArray.res:8:2 - addValueReference ImmutableArray.res:85:6 --> ImmutableArray.res:85:22 + addValueReference ImmutableArray.res:82:6 --> ImmutableArray.res:82:26 + addValueReference ImmutableArray.res:82:6 --> ImmutableArray.res:8:2 + addValueReference ImmutableArray.res:83:6 --> ImmutableArray.res:83:22 + addValueReference ImmutableArray.res:83:6 --> ImmutableArray.res:5:2 + addValueReference ImmutableArray.res:83:6 --> ImmutableArray.res:83:25 + addValueReference ImmutableArray.res:83:6 --> ImmutableArray.res:8:2 + addValueReference ImmutableArray.res:85:6 --> ImmutableArray.res:85:20 addValueReference ImmutableArray.res:85:6 --> ImmutableArray.res:5:2 - addValueReference ImmutableArray.res:85:6 --> ImmutableArray.res:85:25 - addValueReference ImmutableArray.res:85:6 --> ImmutableArray.res:8:2 - addValueReference ImmutableArray.res:87:6 --> ImmutableArray.res:87:20 - addValueReference ImmutableArray.res:87:6 --> ImmutableArray.res:5:2 - addValueReference ImmutableArray.res:87:6 --> ImmutableArray.res:87:23 - addValueReference ImmutableArray.res:87:6 --> ImmutableArray.res:10:2 - addValueReference ImmutableArray.res:88:6 --> ImmutableArray.res:88:19 + addValueReference ImmutableArray.res:85:6 --> ImmutableArray.res:85:23 + addValueReference ImmutableArray.res:85:6 --> ImmutableArray.res:10:2 + addValueReference ImmutableArray.res:86:6 --> ImmutableArray.res:86:19 + addValueReference ImmutableArray.res:86:6 --> ImmutableArray.res:5:2 + addValueReference ImmutableArray.res:86:6 --> ImmutableArray.res:86:22 + addValueReference ImmutableArray.res:86:6 --> ImmutableArray.res:10:2 + addValueReference ImmutableArray.res:88:6 --> ImmutableArray.res:88:17 addValueReference ImmutableArray.res:88:6 --> ImmutableArray.res:5:2 - addValueReference ImmutableArray.res:88:6 --> ImmutableArray.res:88:22 - addValueReference ImmutableArray.res:88:6 --> ImmutableArray.res:10:2 - addValueReference ImmutableArray.res:90:6 --> ImmutableArray.res:90:17 - addValueReference ImmutableArray.res:90:6 --> ImmutableArray.res:5:2 - addValueReference ImmutableArray.res:90:6 --> ImmutableArray.res:90:20 - addValueReference ImmutableArray.res:90:6 --> ImmutableArray.res:90:23 - addValueReference ImmutableArray.res:91:6 --> ImmutableArray.res:91:16 + addValueReference ImmutableArray.res:88:6 --> ImmutableArray.res:88:20 + addValueReference ImmutableArray.res:88:6 --> ImmutableArray.res:88:23 + addValueReference ImmutableArray.res:89:6 --> ImmutableArray.res:89:16 + addValueReference ImmutableArray.res:89:6 --> ImmutableArray.res:5:2 + addValueReference ImmutableArray.res:89:6 --> ImmutableArray.res:89:19 + addValueReference ImmutableArray.res:89:6 --> ImmutableArray.res:89:22 + addValueReference ImmutableArray.res:91:6 --> ImmutableArray.res:91:24 addValueReference ImmutableArray.res:91:6 --> ImmutableArray.res:5:2 - addValueReference ImmutableArray.res:91:6 --> ImmutableArray.res:91:19 - addValueReference ImmutableArray.res:91:6 --> ImmutableArray.res:91:22 - addValueReference ImmutableArray.res:93:6 --> ImmutableArray.res:93:24 - addValueReference ImmutableArray.res:93:6 --> ImmutableArray.res:5:2 - addValueReference ImmutableArray.res:93:6 --> ImmutableArray.res:93:27 - addValueReference ImmutableArray.res:93:6 --> ImmutableArray.res:93:30 - addValueReference ImmutableArray.res:94:6 --> ImmutableArray.res:94:23 + addValueReference ImmutableArray.res:91:6 --> ImmutableArray.res:91:27 + addValueReference ImmutableArray.res:91:6 --> ImmutableArray.res:91:30 + addValueReference ImmutableArray.res:92:6 --> ImmutableArray.res:92:23 + addValueReference ImmutableArray.res:92:6 --> ImmutableArray.res:5:2 + addValueReference ImmutableArray.res:92:6 --> ImmutableArray.res:92:26 + addValueReference ImmutableArray.res:92:6 --> ImmutableArray.res:92:29 + addValueReference ImmutableArray.res:94:6 --> ImmutableArray.res:94:25 addValueReference ImmutableArray.res:94:6 --> ImmutableArray.res:5:2 - addValueReference ImmutableArray.res:94:6 --> ImmutableArray.res:94:26 addValueReference ImmutableArray.res:94:6 --> ImmutableArray.res:94:29 - addValueReference ImmutableArray.res:96:6 --> ImmutableArray.res:96:25 - addValueReference ImmutableArray.res:96:6 --> ImmutableArray.res:5:2 - addValueReference ImmutableArray.res:96:6 --> ImmutableArray.res:96:29 - addValueReference ImmutableArray.res:96:6 --> ImmutableArray.res:5:2 - addValueReference ImmutableArray.res:96:6 --> ImmutableArray.res:96:33 - addValueReference ImmutableArray.res:96:6 --> ImmutableArray.res:96:36 - addValueReference ImmutableArray.res:97:6 --> ImmutableArray.res:97:24 - addValueReference ImmutableArray.res:97:6 --> ImmutableArray.res:5:2 - addValueReference ImmutableArray.res:97:6 --> ImmutableArray.res:97:28 + addValueReference ImmutableArray.res:94:6 --> ImmutableArray.res:5:2 + addValueReference ImmutableArray.res:94:6 --> ImmutableArray.res:94:33 + addValueReference ImmutableArray.res:94:6 --> ImmutableArray.res:94:36 + addValueReference ImmutableArray.res:95:6 --> ImmutableArray.res:95:24 + addValueReference ImmutableArray.res:95:6 --> ImmutableArray.res:5:2 + addValueReference ImmutableArray.res:95:6 --> ImmutableArray.res:95:28 + addValueReference ImmutableArray.res:95:6 --> ImmutableArray.res:5:2 + addValueReference ImmutableArray.res:95:6 --> ImmutableArray.res:95:32 + addValueReference ImmutableArray.res:95:6 --> ImmutableArray.res:95:35 + addValueReference ImmutableArray.res:97:6 --> ImmutableArray.res:97:15 addValueReference ImmutableArray.res:97:6 --> ImmutableArray.res:5:2 - addValueReference ImmutableArray.res:97:6 --> ImmutableArray.res:97:32 - addValueReference ImmutableArray.res:97:6 --> ImmutableArray.res:97:35 - addValueReference ImmutableArray.res:99:6 --> ImmutableArray.res:99:15 - addValueReference ImmutableArray.res:99:6 --> ImmutableArray.res:5:2 - addValueReference ImmutableArray.res:99:6 --> ImmutableArray.res:99:18 - addValueReference ImmutableArray.res:100:6 --> ImmutableArray.res:100:14 + addValueReference ImmutableArray.res:97:6 --> ImmutableArray.res:97:18 + addValueReference ImmutableArray.res:98:6 --> ImmutableArray.res:98:14 + addValueReference ImmutableArray.res:98:6 --> ImmutableArray.res:5:2 + addValueReference ImmutableArray.res:98:6 --> ImmutableArray.res:98:17 + addValueReference ImmutableArray.res:100:6 --> ImmutableArray.res:100:16 addValueReference ImmutableArray.res:100:6 --> ImmutableArray.res:5:2 - addValueReference ImmutableArray.res:100:6 --> ImmutableArray.res:100:17 - addValueReference ImmutableArray.res:102:6 --> ImmutableArray.res:102:16 - addValueReference ImmutableArray.res:102:6 --> ImmutableArray.res:5:2 - addValueReference ImmutableArray.res:102:6 --> ImmutableArray.res:102:19 - addValueReference ImmutableArray.res:103:6 --> ImmutableArray.res:103:15 + addValueReference ImmutableArray.res:100:6 --> ImmutableArray.res:100:19 + addValueReference ImmutableArray.res:101:6 --> ImmutableArray.res:101:15 + addValueReference ImmutableArray.res:101:6 --> ImmutableArray.res:5:2 + addValueReference ImmutableArray.res:101:6 --> ImmutableArray.res:101:18 + addValueReference ImmutableArray.res:103:6 --> ImmutableArray.res:103:17 addValueReference ImmutableArray.res:103:6 --> ImmutableArray.res:5:2 - addValueReference ImmutableArray.res:103:6 --> ImmutableArray.res:103:18 - addValueReference ImmutableArray.res:105:6 --> ImmutableArray.res:105:17 - addValueReference ImmutableArray.res:105:6 --> ImmutableArray.res:5:2 - addValueReference ImmutableArray.res:105:6 --> ImmutableArray.res:105:21 - addValueReference ImmutableArray.res:105:6 --> ImmutableArray.res:5:2 - addValueReference ImmutableArray.res:105:6 --> ImmutableArray.res:105:25 + addValueReference ImmutableArray.res:103:6 --> ImmutableArray.res:103:21 + addValueReference ImmutableArray.res:103:6 --> ImmutableArray.res:5:2 + addValueReference ImmutableArray.res:103:6 --> ImmutableArray.res:103:25 + addValueReference ImmutableArray.res:104:6 --> ImmutableArray.res:104:16 + addValueReference ImmutableArray.res:104:6 --> ImmutableArray.res:5:2 + addValueReference ImmutableArray.res:104:6 --> ImmutableArray.res:104:20 + addValueReference ImmutableArray.res:104:6 --> ImmutableArray.res:5:2 + addValueReference ImmutableArray.res:104:6 --> ImmutableArray.res:104:24 addValueReference ImmutableArray.res:106:6 --> ImmutableArray.res:106:16 addValueReference ImmutableArray.res:106:6 --> ImmutableArray.res:5:2 addValueReference ImmutableArray.res:106:6 --> ImmutableArray.res:106:20 addValueReference ImmutableArray.res:106:6 --> ImmutableArray.res:5:2 addValueReference ImmutableArray.res:106:6 --> ImmutableArray.res:106:24 - addValueReference ImmutableArray.res:108:6 --> ImmutableArray.res:108:16 - addValueReference ImmutableArray.res:108:6 --> ImmutableArray.res:5:2 - addValueReference ImmutableArray.res:108:6 --> ImmutableArray.res:108:20 - addValueReference ImmutableArray.res:108:6 --> ImmutableArray.res:5:2 - addValueReference ImmutableArray.res:108:6 --> ImmutableArray.res:108:24 - addValueReference ImmutableArray.res:109:6 --> ImmutableArray.res:109:15 + addValueReference ImmutableArray.res:107:6 --> ImmutableArray.res:107:15 + addValueReference ImmutableArray.res:107:6 --> ImmutableArray.res:5:2 + addValueReference ImmutableArray.res:107:6 --> ImmutableArray.res:107:19 + addValueReference ImmutableArray.res:107:6 --> ImmutableArray.res:5:2 + addValueReference ImmutableArray.res:107:6 --> ImmutableArray.res:107:23 + addValueReference ImmutableArray.res:109:6 --> ImmutableArray.res:109:14 addValueReference ImmutableArray.res:109:6 --> ImmutableArray.res:5:2 - addValueReference ImmutableArray.res:109:6 --> ImmutableArray.res:109:19 + addValueReference ImmutableArray.res:109:6 --> ImmutableArray.res:109:18 addValueReference ImmutableArray.res:109:6 --> ImmutableArray.res:5:2 - addValueReference ImmutableArray.res:109:6 --> ImmutableArray.res:109:23 - addValueReference ImmutableArray.res:111:6 --> ImmutableArray.res:111:14 - addValueReference ImmutableArray.res:111:6 --> ImmutableArray.res:5:2 - addValueReference ImmutableArray.res:111:6 --> ImmutableArray.res:111:18 - addValueReference ImmutableArray.res:111:6 --> ImmutableArray.res:5:2 - addValueReference ImmutableArray.res:111:6 --> ImmutableArray.res:111:22 + addValueReference ImmutableArray.res:109:6 --> ImmutableArray.res:109:22 + addValueReference ImmutableArray.res:110:6 --> ImmutableArray.res:110:13 + addValueReference ImmutableArray.res:110:6 --> ImmutableArray.res:5:2 + addValueReference ImmutableArray.res:110:6 --> ImmutableArray.res:110:17 + addValueReference ImmutableArray.res:110:6 --> ImmutableArray.res:5:2 + addValueReference ImmutableArray.res:110:6 --> ImmutableArray.res:110:21 addValueReference ImmutableArray.res:112:6 --> ImmutableArray.res:112:13 addValueReference ImmutableArray.res:112:6 --> ImmutableArray.res:5:2 addValueReference ImmutableArray.res:112:6 --> ImmutableArray.res:112:17 addValueReference ImmutableArray.res:112:6 --> ImmutableArray.res:5:2 addValueReference ImmutableArray.res:112:6 --> ImmutableArray.res:112:21 - addValueReference ImmutableArray.res:114:6 --> ImmutableArray.res:114:13 - addValueReference ImmutableArray.res:114:6 --> ImmutableArray.res:5:2 - addValueReference ImmutableArray.res:114:6 --> ImmutableArray.res:114:17 - addValueReference ImmutableArray.res:114:6 --> ImmutableArray.res:5:2 - addValueReference ImmutableArray.res:114:6 --> ImmutableArray.res:114:21 - addValueReference ImmutableArray.res:115:6 --> ImmutableArray.res:115:12 - addValueReference ImmutableArray.res:115:6 --> ImmutableArray.res:5:2 - addValueReference ImmutableArray.res:115:6 --> ImmutableArray.res:115:16 - addValueReference ImmutableArray.res:115:6 --> ImmutableArray.res:5:2 - addValueReference ImmutableArray.res:115:6 --> ImmutableArray.res:115:20 + addValueReference ImmutableArray.res:113:6 --> ImmutableArray.res:113:12 + addValueReference ImmutableArray.res:113:6 --> ImmutableArray.res:5:2 + addValueReference ImmutableArray.res:113:6 --> ImmutableArray.res:113:16 + addValueReference ImmutableArray.res:113:6 --> ImmutableArray.res:5:2 + addValueReference ImmutableArray.res:113:6 --> ImmutableArray.res:113:20 addValueReference ImmutableArray.resi:6:2 --> ImmutableArray.res:24:6 addValueReference ImmutableArray.resi:9:0 --> ImmutableArray.res:14:6 addValueReference ImmutableArray.resi:12:0 --> ImmutableArray.res:16:6 @@ -795,12 +790,12 @@ addValueReference ImmutableArray.resi:35:0 --> ImmutableArray.res:40:6 addValueReference ImmutableArray.resi:37:0 --> ImmutableArray.res:42:6 addValueReference ImmutableArray.resi:39:0 --> ImmutableArray.res:44:6 - addValueReference ImmutableArray.resi:41:0 --> ImmutableArray.res:46:6 + addValueReference ImmutableArray.resi:40:0 --> ImmutableArray.res:45:6 addValueReference ImmutableArray.resi:42:0 --> ImmutableArray.res:47:6 - addValueReference ImmutableArray.resi:44:0 --> ImmutableArray.res:49:6 + addValueReference ImmutableArray.resi:43:0 --> ImmutableArray.res:48:6 addValueReference ImmutableArray.resi:45:0 --> ImmutableArray.res:50:6 addValueReference ImmutableArray.resi:47:0 --> ImmutableArray.res:52:6 - addValueReference ImmutableArray.resi:49:0 --> ImmutableArray.res:54:6 + addValueReference ImmutableArray.resi:48:0 --> ImmutableArray.res:53:6 addValueReference ImmutableArray.resi:50:0 --> ImmutableArray.res:55:6 addValueReference ImmutableArray.resi:52:0 --> ImmutableArray.res:57:6 addValueReference ImmutableArray.resi:54:0 --> ImmutableArray.res:59:6 @@ -808,38 +803,37 @@ addValueReference ImmutableArray.resi:58:0 --> ImmutableArray.res:63:6 addValueReference ImmutableArray.resi:60:0 --> ImmutableArray.res:65:6 addValueReference ImmutableArray.resi:62:0 --> ImmutableArray.res:67:6 - addValueReference ImmutableArray.resi:64:0 --> ImmutableArray.res:69:6 + addValueReference ImmutableArray.resi:63:0 --> ImmutableArray.res:68:6 addValueReference ImmutableArray.resi:65:0 --> ImmutableArray.res:70:6 - addValueReference ImmutableArray.resi:67:0 --> ImmutableArray.res:72:6 + addValueReference ImmutableArray.resi:66:0 --> ImmutableArray.res:71:6 addValueReference ImmutableArray.resi:68:0 --> ImmutableArray.res:73:6 - addValueReference ImmutableArray.resi:70:0 --> ImmutableArray.res:75:6 + addValueReference ImmutableArray.resi:69:0 --> ImmutableArray.res:74:6 addValueReference ImmutableArray.resi:71:0 --> ImmutableArray.res:76:6 - addValueReference ImmutableArray.resi:73:0 --> ImmutableArray.res:78:6 + addValueReference ImmutableArray.resi:72:0 --> ImmutableArray.res:77:6 addValueReference ImmutableArray.resi:74:0 --> ImmutableArray.res:79:6 - addValueReference ImmutableArray.resi:76:0 --> ImmutableArray.res:81:6 + addValueReference ImmutableArray.resi:75:0 --> ImmutableArray.res:80:6 addValueReference ImmutableArray.resi:77:0 --> ImmutableArray.res:82:6 - addValueReference ImmutableArray.resi:79:0 --> ImmutableArray.res:84:6 + addValueReference ImmutableArray.resi:78:0 --> ImmutableArray.res:83:6 addValueReference ImmutableArray.resi:80:0 --> ImmutableArray.res:85:6 - addValueReference ImmutableArray.resi:82:0 --> ImmutableArray.res:87:6 + addValueReference ImmutableArray.resi:81:0 --> ImmutableArray.res:86:6 addValueReference ImmutableArray.resi:83:0 --> ImmutableArray.res:88:6 - addValueReference ImmutableArray.resi:85:0 --> ImmutableArray.res:90:6 + addValueReference ImmutableArray.resi:84:0 --> ImmutableArray.res:89:6 addValueReference ImmutableArray.resi:86:0 --> ImmutableArray.res:91:6 - addValueReference ImmutableArray.resi:88:0 --> ImmutableArray.res:93:6 + addValueReference ImmutableArray.resi:87:0 --> ImmutableArray.res:92:6 addValueReference ImmutableArray.resi:89:0 --> ImmutableArray.res:94:6 - addValueReference ImmutableArray.resi:91:0 --> ImmutableArray.res:96:6 + addValueReference ImmutableArray.resi:90:0 --> ImmutableArray.res:95:6 addValueReference ImmutableArray.resi:92:0 --> ImmutableArray.res:97:6 - addValueReference ImmutableArray.resi:94:0 --> ImmutableArray.res:99:6 + addValueReference ImmutableArray.resi:93:0 --> ImmutableArray.res:98:6 addValueReference ImmutableArray.resi:95:0 --> ImmutableArray.res:100:6 - addValueReference ImmutableArray.resi:97:0 --> ImmutableArray.res:102:6 + addValueReference ImmutableArray.resi:96:0 --> ImmutableArray.res:101:6 addValueReference ImmutableArray.resi:98:0 --> ImmutableArray.res:103:6 - addValueReference ImmutableArray.resi:100:0 --> ImmutableArray.res:105:6 + addValueReference ImmutableArray.resi:99:0 --> ImmutableArray.res:104:6 addValueReference ImmutableArray.resi:101:0 --> ImmutableArray.res:106:6 - addValueReference ImmutableArray.resi:103:0 --> ImmutableArray.res:108:6 + addValueReference ImmutableArray.resi:102:0 --> ImmutableArray.res:107:6 addValueReference ImmutableArray.resi:104:0 --> ImmutableArray.res:109:6 - addValueReference ImmutableArray.resi:106:0 --> ImmutableArray.res:111:6 + addValueReference ImmutableArray.resi:105:0 --> ImmutableArray.res:110:6 addValueReference ImmutableArray.resi:107:0 --> ImmutableArray.res:112:6 - addValueReference ImmutableArray.resi:109:0 --> ImmutableArray.res:114:6 - addValueReference ImmutableArray.resi:110:0 --> ImmutableArray.res:115:6 + addValueReference ImmutableArray.resi:108:0 --> ImmutableArray.res:113:6 Scanning ImmutableArray.cmti Source:ImmutableArray.resi addValueDeclaration +get ImmutableArray.resi:6:2 path:ImmutableArray.Array addValueDeclaration +fromArray ImmutableArray.resi:9:0 path:ImmutableArray @@ -849,59 +843,58 @@ addValueDeclaration +get ImmutableArray.resi:19:0 path:ImmutableArray addValueDeclaration +getExn ImmutableArray.resi:21:0 path:ImmutableArray addValueDeclaration +getUnsafe ImmutableArray.resi:23:0 path:ImmutableArray - addValueDeclaration +getUndefined ImmutableArray.resi:25:0 path:ImmutableArray - addValueDeclaration +shuffle ImmutableArray.resi:27:0 path:ImmutableArray - addValueDeclaration +reverse ImmutableArray.resi:29:0 path:ImmutableArray - addValueDeclaration +makeUninitialized ImmutableArray.resi:31:0 path:ImmutableArray - addValueDeclaration +makeUninitializedUnsafe ImmutableArray.resi:33:0 path:ImmutableArray - addValueDeclaration +make ImmutableArray.resi:35:0 path:ImmutableArray - addValueDeclaration +range ImmutableArray.resi:37:0 path:ImmutableArray - addValueDeclaration +rangeBy ImmutableArray.resi:39:0 path:ImmutableArray - addValueDeclaration +makeByU ImmutableArray.resi:41:0 path:ImmutableArray - addValueDeclaration +makeBy ImmutableArray.resi:42:0 path:ImmutableArray - addValueDeclaration +makeByAndShuffleU ImmutableArray.resi:44:0 path:ImmutableArray - addValueDeclaration +makeByAndShuffle ImmutableArray.resi:45:0 path:ImmutableArray - addValueDeclaration +zip ImmutableArray.resi:47:0 path:ImmutableArray - addValueDeclaration +zipByU ImmutableArray.resi:49:0 path:ImmutableArray - addValueDeclaration +zipBy ImmutableArray.resi:50:0 path:ImmutableArray - addValueDeclaration +unzip ImmutableArray.resi:52:0 path:ImmutableArray - addValueDeclaration +concat ImmutableArray.resi:54:0 path:ImmutableArray - addValueDeclaration +concatMany ImmutableArray.resi:56:0 path:ImmutableArray - addValueDeclaration +slice ImmutableArray.resi:58:0 path:ImmutableArray - addValueDeclaration +sliceToEnd ImmutableArray.resi:60:0 path:ImmutableArray - addValueDeclaration +copy ImmutableArray.resi:62:0 path:ImmutableArray - addValueDeclaration +forEachU ImmutableArray.resi:64:0 path:ImmutableArray - addValueDeclaration +forEach ImmutableArray.resi:65:0 path:ImmutableArray - addValueDeclaration +mapU ImmutableArray.resi:67:0 path:ImmutableArray - addValueDeclaration +map ImmutableArray.resi:68:0 path:ImmutableArray - addValueDeclaration +keepWithIndexU ImmutableArray.resi:70:0 path:ImmutableArray - addValueDeclaration +keepWithIndex ImmutableArray.resi:71:0 path:ImmutableArray - addValueDeclaration +keepMapU ImmutableArray.resi:73:0 path:ImmutableArray - addValueDeclaration +keepMap ImmutableArray.resi:74:0 path:ImmutableArray - addValueDeclaration +forEachWithIndexU ImmutableArray.resi:76:0 path:ImmutableArray - addValueDeclaration +forEachWithIndex ImmutableArray.resi:77:0 path:ImmutableArray - addValueDeclaration +mapWithIndexU ImmutableArray.resi:79:0 path:ImmutableArray - addValueDeclaration +mapWithIndex ImmutableArray.resi:80:0 path:ImmutableArray - addValueDeclaration +partitionU ImmutableArray.resi:82:0 path:ImmutableArray - addValueDeclaration +partition ImmutableArray.resi:83:0 path:ImmutableArray - addValueDeclaration +reduceU ImmutableArray.resi:85:0 path:ImmutableArray - addValueDeclaration +reduce ImmutableArray.resi:86:0 path:ImmutableArray - addValueDeclaration +reduceReverseU ImmutableArray.resi:88:0 path:ImmutableArray - addValueDeclaration +reduceReverse ImmutableArray.resi:89:0 path:ImmutableArray - addValueDeclaration +reduceReverse2U ImmutableArray.resi:91:0 path:ImmutableArray - addValueDeclaration +reduceReverse2 ImmutableArray.resi:92:0 path:ImmutableArray - addValueDeclaration +someU ImmutableArray.resi:94:0 path:ImmutableArray - addValueDeclaration +some ImmutableArray.resi:95:0 path:ImmutableArray - addValueDeclaration +everyU ImmutableArray.resi:97:0 path:ImmutableArray - addValueDeclaration +every ImmutableArray.resi:98:0 path:ImmutableArray - addValueDeclaration +every2U ImmutableArray.resi:100:0 path:ImmutableArray - addValueDeclaration +every2 ImmutableArray.resi:101:0 path:ImmutableArray - addValueDeclaration +some2U ImmutableArray.resi:103:0 path:ImmutableArray - addValueDeclaration +some2 ImmutableArray.resi:104:0 path:ImmutableArray - addValueDeclaration +cmpU ImmutableArray.resi:106:0 path:ImmutableArray - addValueDeclaration +cmp ImmutableArray.resi:107:0 path:ImmutableArray - addValueDeclaration +eqU ImmutableArray.resi:109:0 path:ImmutableArray - addValueDeclaration +eq ImmutableArray.resi:110:0 path:ImmutableArray + addValueDeclaration +shuffle ImmutableArray.resi:25:0 path:ImmutableArray + addValueDeclaration +reverse ImmutableArray.resi:27:0 path:ImmutableArray + addValueDeclaration +makeUninitialized ImmutableArray.resi:29:0 path:ImmutableArray + addValueDeclaration +makeUninitializedUnsafe ImmutableArray.resi:31:0 path:ImmutableArray + addValueDeclaration +make ImmutableArray.resi:33:0 path:ImmutableArray + addValueDeclaration +range ImmutableArray.resi:35:0 path:ImmutableArray + addValueDeclaration +rangeBy ImmutableArray.resi:37:0 path:ImmutableArray + addValueDeclaration +makeByU ImmutableArray.resi:39:0 path:ImmutableArray + addValueDeclaration +makeBy ImmutableArray.resi:40:0 path:ImmutableArray + addValueDeclaration +makeByAndShuffleU ImmutableArray.resi:42:0 path:ImmutableArray + addValueDeclaration +makeByAndShuffle ImmutableArray.resi:43:0 path:ImmutableArray + addValueDeclaration +zip ImmutableArray.resi:45:0 path:ImmutableArray + addValueDeclaration +zipByU ImmutableArray.resi:47:0 path:ImmutableArray + addValueDeclaration +zipBy ImmutableArray.resi:48:0 path:ImmutableArray + addValueDeclaration +unzip ImmutableArray.resi:50:0 path:ImmutableArray + addValueDeclaration +concat ImmutableArray.resi:52:0 path:ImmutableArray + addValueDeclaration +concatMany ImmutableArray.resi:54:0 path:ImmutableArray + addValueDeclaration +slice ImmutableArray.resi:56:0 path:ImmutableArray + addValueDeclaration +sliceToEnd ImmutableArray.resi:58:0 path:ImmutableArray + addValueDeclaration +copy ImmutableArray.resi:60:0 path:ImmutableArray + addValueDeclaration +forEachU ImmutableArray.resi:62:0 path:ImmutableArray + addValueDeclaration +forEach ImmutableArray.resi:63:0 path:ImmutableArray + addValueDeclaration +mapU ImmutableArray.resi:65:0 path:ImmutableArray + addValueDeclaration +map ImmutableArray.resi:66:0 path:ImmutableArray + addValueDeclaration +keepWithIndexU ImmutableArray.resi:68:0 path:ImmutableArray + addValueDeclaration +keepWithIndex ImmutableArray.resi:69:0 path:ImmutableArray + addValueDeclaration +keepMapU ImmutableArray.resi:71:0 path:ImmutableArray + addValueDeclaration +keepMap ImmutableArray.resi:72:0 path:ImmutableArray + addValueDeclaration +forEachWithIndexU ImmutableArray.resi:74:0 path:ImmutableArray + addValueDeclaration +forEachWithIndex ImmutableArray.resi:75:0 path:ImmutableArray + addValueDeclaration +mapWithIndexU ImmutableArray.resi:77:0 path:ImmutableArray + addValueDeclaration +mapWithIndex ImmutableArray.resi:78:0 path:ImmutableArray + addValueDeclaration +partitionU ImmutableArray.resi:80:0 path:ImmutableArray + addValueDeclaration +partition ImmutableArray.resi:81:0 path:ImmutableArray + addValueDeclaration +reduceU ImmutableArray.resi:83:0 path:ImmutableArray + addValueDeclaration +reduce ImmutableArray.resi:84:0 path:ImmutableArray + addValueDeclaration +reduceReverseU ImmutableArray.resi:86:0 path:ImmutableArray + addValueDeclaration +reduceReverse ImmutableArray.resi:87:0 path:ImmutableArray + addValueDeclaration +reduceReverse2U ImmutableArray.resi:89:0 path:ImmutableArray + addValueDeclaration +reduceReverse2 ImmutableArray.resi:90:0 path:ImmutableArray + addValueDeclaration +someU ImmutableArray.resi:92:0 path:ImmutableArray + addValueDeclaration +some ImmutableArray.resi:93:0 path:ImmutableArray + addValueDeclaration +everyU ImmutableArray.resi:95:0 path:ImmutableArray + addValueDeclaration +every ImmutableArray.resi:96:0 path:ImmutableArray + addValueDeclaration +every2U ImmutableArray.resi:98:0 path:ImmutableArray + addValueDeclaration +every2 ImmutableArray.resi:99:0 path:ImmutableArray + addValueDeclaration +some2U ImmutableArray.resi:101:0 path:ImmutableArray + addValueDeclaration +some2 ImmutableArray.resi:102:0 path:ImmutableArray + addValueDeclaration +cmpU ImmutableArray.resi:104:0 path:ImmutableArray + addValueDeclaration +cmp ImmutableArray.resi:105:0 path:ImmutableArray + addValueDeclaration +eqU ImmutableArray.resi:107:0 path:ImmutableArray + addValueDeclaration +eq ImmutableArray.resi:108:0 path:ImmutableArray Scanning ImportHookDefault.cmt Source:ImportHookDefault.res addValueDeclaration +make ImportHookDefault.res:6:0 path:+ImportHookDefault addRecordLabelDeclaration name ImportHookDefault.res:2:2 path:+ImportHookDefault.person @@ -1944,9 +1937,9 @@ Forward Liveness Analysis - decls: 700 + decls: 698 roots(external targets): 134 - decl-deps: decls_with_out=411 edges_to_decls=288 + decl-deps: decls_with_out=409 edges_to_decls=287 Root (annotated): Value +Hooks.+default Root (external ref): Value +FirstClassModules.M.InnerModule2.+k @@ -2824,9 +2817,6 @@ Forward Liveness Analysis Dead Value +ImmutableArray.+getUnsafe deps: in=1 (live=0 dead=1) out=0 <- ImmutableArray.+getUnsafe (dead) - Dead Value +ImmutableArray.+getUndefined - deps: in=1 (live=0 dead=1) out=0 - <- ImmutableArray.+getUndefined (dead) Dead Value +ImmutableArray.+shuffle deps: in=1 (live=0 dead=1) out=0 <- ImmutableArray.+shuffle (dead) @@ -3008,9 +2998,6 @@ Forward Liveness Analysis Dead Value ImmutableArray.+getUnsafe deps: in=0 (live=0 dead=0) out=1 -> +ImmutableArray.+getUnsafe - Dead Value ImmutableArray.+getUndefined - deps: in=0 (live=0 dead=0) out=1 - -> +ImmutableArray.+getUndefined Dead Value ImmutableArray.+shuffle deps: in=0 (live=0 dead=0) out=1 -> +ImmutableArray.+shuffle @@ -4276,215 +4263,211 @@ Forward Liveness Analysis getUnsafe is never used Warning Dead Value - ImmutableArray.res:30:3-62 - getUndefined is never used - - Warning Dead Value - ImmutableArray.res:32:3-49 + ImmutableArray.res:30:3-49 shuffle is never used Warning Dead Value - ImmutableArray.res:34:3-49 + ImmutableArray.res:32:3-49 reverse is never used Warning Dead Value - ImmutableArray.res:36:3-62 + ImmutableArray.res:34:3-62 makeUninitialized is never used Warning Dead Value - ImmutableArray.res:38:3-74 + ImmutableArray.res:36:3-74 makeUninitializedUnsafe is never used Warning Dead Value - ImmutableArray.res:40:3-44 + ImmutableArray.res:38:3-44 make is never used Warning Dead Value - ImmutableArray.res:42:3-46 + ImmutableArray.res:40:3-46 range is never used Warning Dead Value - ImmutableArray.res:44:3-64 + ImmutableArray.res:42:3-64 rangeBy is never used Warning Dead Value - ImmutableArray.res:46:3-50 + ImmutableArray.res:44:3-50 makeByU is never used Warning Dead Value - ImmutableArray.res:47:3-48 + ImmutableArray.res:45:3-48 makeBy is never used Warning Dead Value - ImmutableArray.res:49:3-70 + ImmutableArray.res:47:3-70 makeByAndShuffleU is never used Warning Dead Value - ImmutableArray.res:50:3-68 + ImmutableArray.res:48:3-68 makeByAndShuffle is never used Warning Dead Value - ImmutableArray.res:52:3-61 + ImmutableArray.res:50:3-61 zip is never used Warning Dead Value - ImmutableArray.res:54:3-72 + ImmutableArray.res:52:3-72 zipByU is never used Warning Dead Value - ImmutableArray.res:55:3-70 + ImmutableArray.res:53:3-70 zipBy is never used Warning Dead Value - ImmutableArray.res:57:3-47 + ImmutableArray.res:55:3-47 unzip is never used Warning Dead Value - ImmutableArray.res:59:3-66 + ImmutableArray.res:57:3-66 concat is never used Warning Dead Value - ImmutableArray.res:61:3-67 + ImmutableArray.res:59:3-67 concatMany is never used Warning Dead Value - ImmutableArray.res:63:3-77 + ImmutableArray.res:61:3-77 slice is never used Warning Dead Value - ImmutableArray.res:65:3-63 + ImmutableArray.res:63:3-63 sliceToEnd is never used Warning Dead Value - ImmutableArray.res:67:3-43 + ImmutableArray.res:65:3-43 copy is never used Warning Dead Value - ImmutableArray.res:69:3-54 + ImmutableArray.res:67:3-54 forEachU is never used Warning Dead Value - ImmutableArray.res:70:3-52 + ImmutableArray.res:68:3-52 forEach is never used Warning Dead Value - ImmutableArray.res:72:3-51 + ImmutableArray.res:70:3-51 mapU is never used Warning Dead Value - ImmutableArray.res:73:3-49 + ImmutableArray.res:71:3-49 map is never used Warning Dead Value - ImmutableArray.res:75:3-71 + ImmutableArray.res:73:3-71 keepWithIndexU is never used Warning Dead Value - ImmutableArray.res:76:3-69 + ImmutableArray.res:74:3-69 keepWithIndex is never used Warning Dead Value - ImmutableArray.res:78:3-59 + ImmutableArray.res:76:3-59 keepMapU is never used Warning Dead Value - ImmutableArray.res:79:3-57 + ImmutableArray.res:77:3-57 keepMap is never used Warning Dead Value - ImmutableArray.res:81:3-72 + ImmutableArray.res:79:3-72 forEachWithIndexU is never used Warning Dead Value - ImmutableArray.res:82:3-70 + ImmutableArray.res:80:3-70 forEachWithIndex is never used Warning Dead Value - ImmutableArray.res:84:3-69 + ImmutableArray.res:82:3-69 mapWithIndexU is never used Warning Dead Value - ImmutableArray.res:85:3-67 + ImmutableArray.res:83:3-67 mapWithIndex is never used Warning Dead Value - ImmutableArray.res:87:3-64 + ImmutableArray.res:85:3-64 partitionU is never used Warning Dead Value - ImmutableArray.res:88:3-62 + ImmutableArray.res:86:3-62 partition is never used Warning Dead Value - ImmutableArray.res:90:3-58 + ImmutableArray.res:88:3-58 reduceU is never used Warning Dead Value - ImmutableArray.res:91:3-56 + ImmutableArray.res:89:3-56 reduce is never used Warning Dead Value - ImmutableArray.res:93:3-72 + ImmutableArray.res:91:3-72 reduceReverseU is never used Warning Dead Value - ImmutableArray.res:94:3-70 + ImmutableArray.res:92:3-70 reduceReverse is never used Warning Dead Value - ImmutableArray.res:96:3-91 + ImmutableArray.res:94:3-91 reduceReverse2U is never used Warning Dead Value - ImmutableArray.res:97:3-89 + ImmutableArray.res:95:3-89 reduceReverse2 is never used Warning Dead Value - ImmutableArray.res:99:3-48 + ImmutableArray.res:97:3-48 someU is never used Warning Dead Value - ImmutableArray.res:100:3-46 + ImmutableArray.res:98:3-46 some is never used Warning Dead Value - ImmutableArray.res:102:3-50 + ImmutableArray.res:100:3-50 everyU is never used Warning Dead Value - ImmutableArray.res:103:3-48 + ImmutableArray.res:101:3-48 every is never used Warning Dead Value - ImmutableArray.res:105:3-69 + ImmutableArray.res:103:3-69 every2U is never used Warning Dead Value - ImmutableArray.res:106:3-67 + ImmutableArray.res:104:3-67 every2 is never used Warning Dead Value - ImmutableArray.res:108:3-67 + ImmutableArray.res:106:3-67 some2U is never used Warning Dead Value - ImmutableArray.res:109:3-65 + ImmutableArray.res:107:3-65 some2 is never used Warning Dead Value - ImmutableArray.res:111:3-63 + ImmutableArray.res:109:3-63 cmpU is never used Warning Dead Value - ImmutableArray.res:112:3-61 + ImmutableArray.res:110:3-61 cmp is never used Warning Dead Value - ImmutableArray.res:114:3-61 + ImmutableArray.res:112:3-61 eqU is never used Warning Dead Value - ImmutableArray.res:115:3-59 + ImmutableArray.res:113:3-59 eq is never used Warning Dead Value @@ -4512,215 +4495,211 @@ Forward Liveness Analysis getUnsafe is never used Warning Dead Value - ImmutableArray.resi:25:1-50 - getUndefined is never used - - Warning Dead Value - ImmutableArray.resi:27:1-27 + ImmutableArray.resi:25:1-27 shuffle is never used Warning Dead Value - ImmutableArray.resi:29:1-27 + ImmutableArray.resi:27:1-27 reverse is never used Warning Dead Value - ImmutableArray.resi:31:1-49 + ImmutableArray.resi:29:1-49 makeUninitialized is never used Warning Dead Value - ImmutableArray.resi:33:1-41 + ImmutableArray.resi:31:1-41 makeUninitializedUnsafe is never used Warning Dead Value - ImmutableArray.resi:35:1-28 + ImmutableArray.resi:33:1-28 make is never used Warning Dead Value - ImmutableArray.resi:37:1-31 + ImmutableArray.resi:35:1-31 range is never used Warning Dead Value - ImmutableArray.resi:39:1-45 + ImmutableArray.resi:37:1-45 rangeBy is never used Warning Dead Value - ImmutableArray.resi:41:1-40 + ImmutableArray.resi:39:1-40 makeByU is never used Warning Dead Value - ImmutableArray.resi:42:1-37 + ImmutableArray.resi:40:1-37 makeBy is never used Warning Dead Value - ImmutableArray.resi:44:1-50 + ImmutableArray.resi:42:1-50 makeByAndShuffleU is never used Warning Dead Value - ImmutableArray.resi:45:1-47 + ImmutableArray.resi:43:1-47 makeByAndShuffle is never used Warning Dead Value - ImmutableArray.resi:47:1-38 + ImmutableArray.resi:45:1-38 zip is never used Warning Dead Value - ImmutableArray.resi:49:1-51 + ImmutableArray.resi:47:1-51 zipByU is never used Warning Dead Value - ImmutableArray.resi:50:1-50 + ImmutableArray.resi:48:1-50 zipBy is never used Warning Dead Value - ImmutableArray.resi:52:1-40 + ImmutableArray.resi:50:1-40 unzip is never used Warning Dead Value - ImmutableArray.resi:54:1-35 + ImmutableArray.resi:52:1-35 concat is never used Warning Dead Value - ImmutableArray.resi:56:1-33 + ImmutableArray.resi:54:1-33 concatMany is never used Warning Dead Value - ImmutableArray.resi:58:1-52 + ImmutableArray.resi:56:1-52 slice is never used Warning Dead Value - ImmutableArray.resi:60:1-37 + ImmutableArray.resi:58:1-37 sliceToEnd is never used Warning Dead Value - ImmutableArray.resi:62:1-24 + ImmutableArray.resi:60:1-24 copy is never used Warning Dead Value - ImmutableArray.resi:64:1-43 + ImmutableArray.resi:62:1-43 forEachU is never used Warning Dead Value - ImmutableArray.resi:65:1-40 + ImmutableArray.resi:63:1-40 forEach is never used Warning Dead Value - ImmutableArray.resi:67:1-38 + ImmutableArray.resi:65:1-38 mapU is never used Warning Dead Value - ImmutableArray.resi:68:1-35 + ImmutableArray.resi:66:1-35 map is never used Warning Dead Value - ImmutableArray.resi:70:1-55 + ImmutableArray.resi:68:1-55 keepWithIndexU is never used Warning Dead Value - ImmutableArray.resi:71:1-54 + ImmutableArray.resi:69:1-54 keepWithIndex is never used Warning Dead Value - ImmutableArray.resi:73:1-50 + ImmutableArray.resi:71:1-50 keepMapU is never used Warning Dead Value - ImmutableArray.resi:74:1-47 + ImmutableArray.resi:72:1-47 keepMap is never used Warning Dead Value - ImmutableArray.resi:76:1-57 + ImmutableArray.resi:74:1-57 forEachWithIndexU is never used Warning Dead Value - ImmutableArray.resi:77:1-56 + ImmutableArray.resi:75:1-56 forEachWithIndex is never used Warning Dead Value - ImmutableArray.resi:79:1-52 + ImmutableArray.resi:77:1-52 mapWithIndexU is never used Warning Dead Value - ImmutableArray.resi:80:1-51 + ImmutableArray.resi:78:1-51 mapWithIndex is never used Warning Dead Value - ImmutableArray.resi:82:1-55 + ImmutableArray.resi:80:1-55 partitionU is never used Warning Dead Value - ImmutableArray.resi:83:1-52 + ImmutableArray.resi:81:1-52 partition is never used Warning Dead Value - ImmutableArray.resi:85:1-46 + ImmutableArray.resi:83:1-46 reduceU is never used Warning Dead Value - ImmutableArray.resi:86:1-45 + ImmutableArray.resi:84:1-45 reduce is never used Warning Dead Value - ImmutableArray.resi:88:1-53 + ImmutableArray.resi:86:1-53 reduceReverseU is never used Warning Dead Value - ImmutableArray.resi:89:1-52 + ImmutableArray.resi:87:1-52 reduceReverse is never used Warning Dead Value - ImmutableArray.resi:91:1-65 + ImmutableArray.resi:89:1-65 reduceReverse2U is never used Warning Dead Value - ImmutableArray.resi:92:1-64 + ImmutableArray.resi:90:1-64 reduceReverse2 is never used Warning Dead Value - ImmutableArray.resi:94:1-40 + ImmutableArray.resi:92:1-40 someU is never used Warning Dead Value - ImmutableArray.resi:95:1-37 + ImmutableArray.resi:93:1-37 some is never used Warning Dead Value - ImmutableArray.resi:97:1-41 + ImmutableArray.resi:95:1-41 everyU is never used Warning Dead Value - ImmutableArray.resi:98:1-38 + ImmutableArray.resi:96:1-38 every is never used Warning Dead Value - ImmutableArray.resi:100:1-53 + ImmutableArray.resi:98:1-53 every2U is never used Warning Dead Value - ImmutableArray.resi:101:1-52 + ImmutableArray.resi:99:1-52 every2 is never used Warning Dead Value - ImmutableArray.resi:103:1-52 + ImmutableArray.resi:101:1-52 some2U is never used Warning Dead Value - ImmutableArray.resi:104:1-51 + ImmutableArray.resi:102:1-51 some2 is never used Warning Dead Value - ImmutableArray.resi:106:1-48 + ImmutableArray.resi:104:1-48 cmpU is never used Warning Dead Value - ImmutableArray.resi:107:1-47 + ImmutableArray.resi:105:1-47 cmp is never used Warning Dead Value - ImmutableArray.resi:109:1-49 + ImmutableArray.resi:107:1-49 eqU is never used Warning Dead Value - ImmutableArray.resi:110:1-48 + ImmutableArray.resi:108:1-48 eq is never used Warning Dead Type @@ -5255,4 +5234,4 @@ Forward Liveness Analysis OptArg.res:26:1-70 optional argument c of function wrapfourArgs is always supplied (2 calls) - Analysis reported 320 issues (Incorrect Dead Annotation:1, Warning Dead Exception:2, Warning Dead Module:22, Warning Dead Type:93, Warning Dead Value:179, Warning Dead Value With Side Effects:5, Warning Redundant Optional Argument:6, Warning Unused Argument:12) + Analysis reported 318 issues (Incorrect Dead Annotation:1, Warning Dead Exception:2, Warning Dead Module:22, Warning Dead Type:93, Warning Dead Value:177, Warning Dead Value With Side Effects:5, Warning Redundant Optional Argument:6, Warning Unused Argument:12) diff --git a/tests/analysis_tests/tests-reanalyze/deadcode/src/ImmutableArray.res b/tests/analysis_tests/tests-reanalyze/deadcode/src/ImmutableArray.res index 8ed5e0809ee..fa3f7f418ce 100644 --- a/tests/analysis_tests/tests-reanalyze/deadcode/src/ImmutableArray.res +++ b/tests/analysis_tests/tests-reanalyze/deadcode/src/ImmutableArray.res @@ -27,8 +27,6 @@ module Array = { let getUnsafe = (a, x) => Array.getUnsafe(a->fromT, x) - let getUndefined = (a, x) => Array.getUndefined(a->fromT, x) - let shuffle = x => Array.shuffle(x->fromT)->toT let reverse = x => Array.reverse(x->fromT)->toT @@ -116,4 +114,3 @@ module Array = { } include Array - diff --git a/tests/analysis_tests/tests-reanalyze/deadcode/src/ImmutableArray.resi b/tests/analysis_tests/tests-reanalyze/deadcode/src/ImmutableArray.resi index d1bdc068a0a..a0695a8aac6 100644 --- a/tests/analysis_tests/tests-reanalyze/deadcode/src/ImmutableArray.resi +++ b/tests/analysis_tests/tests-reanalyze/deadcode/src/ImmutableArray.resi @@ -22,8 +22,6 @@ let getExn: (t<'a>, int) => 'a let getUnsafe: (t<'a>, int) => 'a -let getUndefined: (t<'a>, int) => Js.undefined<'a> - let shuffle: t<'a> => t<'a> let reverse: t<'a> => t<'a> @@ -108,4 +106,3 @@ let cmp: (t<'a>, t<'a>, ('a, 'a) => int) => int let eqU: (t<'a>, t<'a>, ('a, 'a) => bool) => bool let eq: (t<'a>, t<'a>, ('a, 'a) => bool) => bool - diff --git a/tests/gentype_tests/typescript-react-example/src/ImmutableArray.res b/tests/gentype_tests/typescript-react-example/src/ImmutableArray.res index 458f61767b8..55d271d9609 100644 --- a/tests/gentype_tests/typescript-react-example/src/ImmutableArray.res +++ b/tests/gentype_tests/typescript-react-example/src/ImmutableArray.res @@ -27,8 +27,6 @@ module Array = { let getUnsafe = (a, x) => Array.getUnsafe(a->fromT, x) - let getUndefined = (a, x) => Array.getUndefined(a->fromT, x) - let shuffle = x => Array.shuffle(x->fromT)->toT let reverse = x => Array.reverse(x->fromT)->toT diff --git a/tests/gentype_tests/typescript-react-example/src/ImmutableArray.res.js b/tests/gentype_tests/typescript-react-example/src/ImmutableArray.res.js index bb78304f0a1..624a05dd831 100644 --- a/tests/gentype_tests/typescript-react-example/src/ImmutableArray.res.js +++ b/tests/gentype_tests/typescript-react-example/src/ImmutableArray.res.js @@ -26,10 +26,6 @@ function getUnsafe(a, x) { return a[x]; } -function getUndefined(a, x) { - return a[x]; -} - let shuffle = Belt_Array.shuffle; let reverse = Belt_Array.reverse; @@ -153,7 +149,6 @@ export { get, getExn, getUnsafe, - getUndefined, shuffle, reverse, makeUninitialized, diff --git a/tests/gentype_tests/typescript-react-example/src/ImmutableArray.resi b/tests/gentype_tests/typescript-react-example/src/ImmutableArray.resi index adef7af76a2..6616546510e 100644 --- a/tests/gentype_tests/typescript-react-example/src/ImmutableArray.resi +++ b/tests/gentype_tests/typescript-react-example/src/ImmutableArray.resi @@ -22,8 +22,6 @@ let getExn: (t<'a>, int) => 'a let getUnsafe: (t<'a>, int) => 'a -let getUndefined: (t<'a>, int) => Js.undefined<'a> - let shuffle: t<'a> => t<'a> let reverse: t<'a> => t<'a> diff --git a/tests/tests/src/bs_mutable_set_test.mjs b/tests/tests/src/bs_mutable_set_test.mjs index 0cd817dd599..6b9f967a068 100644 --- a/tests/tests/src/bs_mutable_set_test.mjs +++ b/tests/tests/src/bs_mutable_set_test.mjs @@ -17,8 +17,8 @@ Mocha.describe("Bs_mutable_set_test", () => { Test_utils.ok("File \"bs_mutable_set_test.res\", line 19, characters 7-14", Belt_MutableSetInt.removeCheck(u, 20)); Test_utils.eq("File \"bs_mutable_set_test.res\", line 20, characters 7-14", Belt_MutableSetInt.size(u), 28); let r = Array_data_util.randomRange(0, 30); - Test_utils.ok("File \"bs_mutable_set_test.res\", line 22, characters 7-14", 29 === Belt_MutableSetInt.maxUndefined(u)); - Test_utils.ok("File \"bs_mutable_set_test.res\", line 23, characters 7-14", 1 === Belt_MutableSetInt.minUndefined(u)); + Test_utils.eq("File \"bs_mutable_set_test.res\", line 22, characters 7-14", Belt_MutableSetInt.maximum(u), 29); + Test_utils.eq("File \"bs_mutable_set_test.res\", line 23, characters 7-14", Belt_MutableSetInt.minimum(u), 1); Belt_MutableSetInt.add(u, 3); for (let i = 0, i_finish = r.length; i < i_finish; ++i) { Belt_MutableSetInt.remove(u, r[i]); @@ -76,48 +76,46 @@ Mocha.describe("Bs_mutable_set_test", () => { Test_utils.ok("File \"bs_mutable_set_test.res\", line 85, characters 7-14", Belt_MutableSetInt.isEmpty(Belt_MutableSetInt.make())); Test_utils.eq("File \"bs_mutable_set_test.res\", line 86, characters 7-14", Belt_MutableSetInt.minimum(v), 500); Test_utils.eq("File \"bs_mutable_set_test.res\", line 87, characters 7-14", Belt_MutableSetInt.maximum(v), 2000); - Test_utils.eq("File \"bs_mutable_set_test.res\", line 88, characters 7-14", Belt_MutableSetInt.minUndefined(v), 500); - Test_utils.eq("File \"bs_mutable_set_test.res\", line 89, characters 7-14", Belt_MutableSetInt.maxUndefined(v), 2000); - Test_utils.eq("File \"bs_mutable_set_test.res\", line 90, characters 7-14", Belt_MutableSetInt.reduce(v, 0, (x, y) => x + y | 0), 1876250); - Test_utils.ok("File \"bs_mutable_set_test.res\", line 91, characters 7-14", Belt_List.eq(Belt_MutableSetInt.toList(v), Belt_List.makeBy(1501, i => i + 500 | 0), (x, y) => x === y)); - Test_utils.eq("File \"bs_mutable_set_test.res\", line 92, characters 7-14", Belt_MutableSetInt.toArray(v), Array_data_util.range(500, 2000)); + Test_utils.eq("File \"bs_mutable_set_test.res\", line 88, characters 7-14", Belt_MutableSetInt.reduce(v, 0, (x, y) => x + y | 0), 1876250); + Test_utils.ok("File \"bs_mutable_set_test.res\", line 89, characters 7-14", Belt_List.eq(Belt_MutableSetInt.toList(v), Belt_List.makeBy(1501, i => i + 500 | 0), (x, y) => x === y)); + Test_utils.eq("File \"bs_mutable_set_test.res\", line 90, characters 7-14", Belt_MutableSetInt.toArray(v), Array_data_util.range(500, 2000)); Belt_MutableSetInt.checkInvariantInternal(v); - Test_utils.eq("File \"bs_mutable_set_test.res\", line 94, characters 7-14", Belt_MutableSetInt.get(v, 3), undefined); - Test_utils.eq("File \"bs_mutable_set_test.res\", line 95, characters 7-14", Belt_MutableSetInt.get(v, 1200), 1200); + Test_utils.eq("File \"bs_mutable_set_test.res\", line 92, characters 7-14", Belt_MutableSetInt.get(v, 3), undefined); + Test_utils.eq("File \"bs_mutable_set_test.res\", line 93, characters 7-14", Belt_MutableSetInt.get(v, 1200), 1200); let match = Belt_MutableSetInt.split(v, 1000); let match$1 = match[0]; let bb = match$1[1]; let aa = match$1[0]; - Test_utils.ok("File \"bs_mutable_set_test.res\", line 97, characters 7-14", match[1]); - Test_utils.ok("File \"bs_mutable_set_test.res\", line 98, characters 7-14", Belt_Array.eq(Belt_MutableSetInt.toArray(aa), Array_data_util.range(500, 999), (x, y) => x === y)); - Test_utils.ok("File \"bs_mutable_set_test.res\", line 99, characters 7-14", Belt_Array.eq(Belt_MutableSetInt.toArray(bb), Array_data_util.range(1001, 2000), (x, y) => x === y)); - Test_utils.ok("File \"bs_mutable_set_test.res\", line 100, characters 7-14", Belt_MutableSetInt.subset(aa, v)); - Test_utils.ok("File \"bs_mutable_set_test.res\", line 101, characters 7-14", Belt_MutableSetInt.subset(bb, v)); - Test_utils.ok("File \"bs_mutable_set_test.res\", line 102, characters 7-14", Belt_MutableSetInt.isEmpty(Belt_MutableSetInt.intersect(aa, bb))); + Test_utils.ok("File \"bs_mutable_set_test.res\", line 95, characters 7-14", match[1]); + Test_utils.ok("File \"bs_mutable_set_test.res\", line 96, characters 7-14", Belt_Array.eq(Belt_MutableSetInt.toArray(aa), Array_data_util.range(500, 999), (x, y) => x === y)); + Test_utils.ok("File \"bs_mutable_set_test.res\", line 97, characters 7-14", Belt_Array.eq(Belt_MutableSetInt.toArray(bb), Array_data_util.range(1001, 2000), (x, y) => x === y)); + Test_utils.ok("File \"bs_mutable_set_test.res\", line 98, characters 7-14", Belt_MutableSetInt.subset(aa, v)); + Test_utils.ok("File \"bs_mutable_set_test.res\", line 99, characters 7-14", Belt_MutableSetInt.subset(bb, v)); + Test_utils.ok("File \"bs_mutable_set_test.res\", line 100, characters 7-14", Belt_MutableSetInt.isEmpty(Belt_MutableSetInt.intersect(aa, bb))); let c = Belt_MutableSetInt.removeCheck(v, 1000); - Test_utils.ok("File \"bs_mutable_set_test.res\", line 104, characters 7-14", c); + Test_utils.ok("File \"bs_mutable_set_test.res\", line 102, characters 7-14", c); let match$2 = Belt_MutableSetInt.split(v, 1000); let match$3 = match$2[0]; let bb$1 = match$3[1]; let aa$1 = match$3[0]; - Test_utils.ok("File \"bs_mutable_set_test.res\", line 106, characters 7-14", !match$2[1]); - Test_utils.ok("File \"bs_mutable_set_test.res\", line 107, characters 7-14", Belt_Array.eq(Belt_MutableSetInt.toArray(aa$1), Array_data_util.range(500, 999), (x, y) => x === y)); - Test_utils.ok("File \"bs_mutable_set_test.res\", line 108, characters 7-14", Belt_Array.eq(Belt_MutableSetInt.toArray(bb$1), Array_data_util.range(1001, 2000), (x, y) => x === y)); - Test_utils.ok("File \"bs_mutable_set_test.res\", line 109, characters 7-14", Belt_MutableSetInt.subset(aa$1, v)); - Test_utils.ok("File \"bs_mutable_set_test.res\", line 110, characters 7-14", Belt_MutableSetInt.subset(bb$1, v)); - Test_utils.ok("File \"bs_mutable_set_test.res\", line 111, characters 7-14", Belt_MutableSetInt.isEmpty(Belt_MutableSetInt.intersect(aa$1, bb$1))); + Test_utils.ok("File \"bs_mutable_set_test.res\", line 104, characters 7-14", !match$2[1]); + Test_utils.ok("File \"bs_mutable_set_test.res\", line 105, characters 7-14", Belt_Array.eq(Belt_MutableSetInt.toArray(aa$1), Array_data_util.range(500, 999), (x, y) => x === y)); + Test_utils.ok("File \"bs_mutable_set_test.res\", line 106, characters 7-14", Belt_Array.eq(Belt_MutableSetInt.toArray(bb$1), Array_data_util.range(1001, 2000), (x, y) => x === y)); + Test_utils.ok("File \"bs_mutable_set_test.res\", line 107, characters 7-14", Belt_MutableSetInt.subset(aa$1, v)); + Test_utils.ok("File \"bs_mutable_set_test.res\", line 108, characters 7-14", Belt_MutableSetInt.subset(bb$1, v)); + Test_utils.ok("File \"bs_mutable_set_test.res\", line 109, characters 7-14", Belt_MutableSetInt.isEmpty(Belt_MutableSetInt.intersect(aa$1, bb$1))); }); Mocha.test("mutable set union operations", () => { let aa = Belt_MutableSetInt.fromArray(Array_data_util.randomRange(0, 100)); let bb = Belt_MutableSetInt.fromArray(Array_data_util.randomRange(40, 120)); let cc = Belt_MutableSetInt.union(aa, bb); - Test_utils.ok("File \"bs_mutable_set_test.res\", line 121, characters 7-14", Belt_MutableSetInt.eq(cc, Belt_MutableSetInt.fromArray(Array_data_util.randomRange(0, 120)))); - Test_utils.ok("File \"bs_mutable_set_test.res\", line 124, characters 6-13", Belt_MutableSetInt.eq(Belt_MutableSetInt.union(Belt_MutableSetInt.fromArray(Array_data_util.randomRange(0, 20)), Belt_MutableSetInt.fromArray(Array_data_util.randomRange(21, 40))), Belt_MutableSetInt.fromArray(Array_data_util.randomRange(0, 40)))); + Test_utils.ok("File \"bs_mutable_set_test.res\", line 119, characters 7-14", Belt_MutableSetInt.eq(cc, Belt_MutableSetInt.fromArray(Array_data_util.randomRange(0, 120)))); + Test_utils.ok("File \"bs_mutable_set_test.res\", line 122, characters 6-13", Belt_MutableSetInt.eq(Belt_MutableSetInt.union(Belt_MutableSetInt.fromArray(Array_data_util.randomRange(0, 20)), Belt_MutableSetInt.fromArray(Array_data_util.randomRange(21, 40))), Belt_MutableSetInt.fromArray(Array_data_util.randomRange(0, 40)))); let dd = Belt_MutableSetInt.intersect(aa, bb); - Test_utils.ok("File \"bs_mutable_set_test.res\", line 128, characters 7-14", Belt_MutableSetInt.eq(dd, Belt_MutableSetInt.fromArray(Array_data_util.randomRange(40, 100)))); - Test_utils.ok("File \"bs_mutable_set_test.res\", line 129, characters 7-14", Belt_MutableSetInt.eq(Belt_MutableSetInt.intersect(Belt_MutableSetInt.fromArray(Array_data_util.randomRange(0, 20)), Belt_MutableSetInt.fromArray(Array_data_util.randomRange(21, 40))), Belt_MutableSetInt.make())); - Test_utils.ok("File \"bs_mutable_set_test.res\", line 130, characters 7-14", Belt_MutableSetInt.eq(Belt_MutableSetInt.intersect(Belt_MutableSetInt.fromArray(Array_data_util.randomRange(21, 40)), Belt_MutableSetInt.fromArray(Array_data_util.randomRange(0, 20))), Belt_MutableSetInt.make())); - Test_utils.ok("File \"bs_mutable_set_test.res\", line 131, characters 7-14", Belt_MutableSetInt.eq(Belt_MutableSetInt.intersect(Belt_MutableSetInt.fromArray([ + Test_utils.ok("File \"bs_mutable_set_test.res\", line 126, characters 7-14", Belt_MutableSetInt.eq(dd, Belt_MutableSetInt.fromArray(Array_data_util.randomRange(40, 100)))); + Test_utils.ok("File \"bs_mutable_set_test.res\", line 127, characters 7-14", Belt_MutableSetInt.eq(Belt_MutableSetInt.intersect(Belt_MutableSetInt.fromArray(Array_data_util.randomRange(0, 20)), Belt_MutableSetInt.fromArray(Array_data_util.randomRange(21, 40))), Belt_MutableSetInt.make())); + Test_utils.ok("File \"bs_mutable_set_test.res\", line 128, characters 7-14", Belt_MutableSetInt.eq(Belt_MutableSetInt.intersect(Belt_MutableSetInt.fromArray(Array_data_util.randomRange(21, 40)), Belt_MutableSetInt.fromArray(Array_data_util.randomRange(0, 20))), Belt_MutableSetInt.make())); + Test_utils.ok("File \"bs_mutable_set_test.res\", line 129, characters 7-14", Belt_MutableSetInt.eq(Belt_MutableSetInt.intersect(Belt_MutableSetInt.fromArray([ 1, 3, 4, @@ -135,11 +133,11 @@ Mocha.describe("Bs_mutable_set_test", () => { 4, 5 ]))); - Test_utils.ok("File \"bs_mutable_set_test.res\", line 132, characters 7-14", Belt_MutableSetInt.eq(Belt_MutableSetInt.diff(aa, bb), Belt_MutableSetInt.fromArray(Array_data_util.randomRange(0, 39)))); - Test_utils.ok("File \"bs_mutable_set_test.res\", line 133, characters 7-14", Belt_MutableSetInt.eq(Belt_MutableSetInt.diff(bb, aa), Belt_MutableSetInt.fromArray(Array_data_util.randomRange(101, 120)))); - Test_utils.ok("File \"bs_mutable_set_test.res\", line 135, characters 6-13", Belt_MutableSetInt.eq(Belt_MutableSetInt.diff(Belt_MutableSetInt.fromArray(Array_data_util.randomRange(21, 40)), Belt_MutableSetInt.fromArray(Array_data_util.randomRange(0, 20))), Belt_MutableSetInt.fromArray(Array_data_util.randomRange(21, 40)))); - Test_utils.ok("File \"bs_mutable_set_test.res\", line 139, characters 6-13", Belt_MutableSetInt.eq(Belt_MutableSetInt.diff(Belt_MutableSetInt.fromArray(Array_data_util.randomRange(0, 20)), Belt_MutableSetInt.fromArray(Array_data_util.randomRange(21, 40))), Belt_MutableSetInt.fromArray(Array_data_util.randomRange(0, 20)))); - Test_utils.ok("File \"bs_mutable_set_test.res\", line 144, characters 6-13", Belt_MutableSetInt.eq(Belt_MutableSetInt.diff(Belt_MutableSetInt.fromArray(Array_data_util.randomRange(0, 20)), Belt_MutableSetInt.fromArray(Array_data_util.randomRange(0, 40))), Belt_MutableSetInt.fromArray(Array_data_util.randomRange(0, -1)))); + Test_utils.ok("File \"bs_mutable_set_test.res\", line 130, characters 7-14", Belt_MutableSetInt.eq(Belt_MutableSetInt.diff(aa, bb), Belt_MutableSetInt.fromArray(Array_data_util.randomRange(0, 39)))); + Test_utils.ok("File \"bs_mutable_set_test.res\", line 131, characters 7-14", Belt_MutableSetInt.eq(Belt_MutableSetInt.diff(bb, aa), Belt_MutableSetInt.fromArray(Array_data_util.randomRange(101, 120)))); + Test_utils.ok("File \"bs_mutable_set_test.res\", line 133, characters 6-13", Belt_MutableSetInt.eq(Belt_MutableSetInt.diff(Belt_MutableSetInt.fromArray(Array_data_util.randomRange(21, 40)), Belt_MutableSetInt.fromArray(Array_data_util.randomRange(0, 20))), Belt_MutableSetInt.fromArray(Array_data_util.randomRange(21, 40)))); + Test_utils.ok("File \"bs_mutable_set_test.res\", line 137, characters 6-13", Belt_MutableSetInt.eq(Belt_MutableSetInt.diff(Belt_MutableSetInt.fromArray(Array_data_util.randomRange(0, 20)), Belt_MutableSetInt.fromArray(Array_data_util.randomRange(21, 40))), Belt_MutableSetInt.fromArray(Array_data_util.randomRange(0, 20)))); + Test_utils.ok("File \"bs_mutable_set_test.res\", line 142, characters 6-13", Belt_MutableSetInt.eq(Belt_MutableSetInt.diff(Belt_MutableSetInt.fromArray(Array_data_util.randomRange(0, 20)), Belt_MutableSetInt.fromArray(Array_data_util.randomRange(0, 40))), Belt_MutableSetInt.fromArray(Array_data_util.randomRange(0, -1)))); }); Mocha.test("mutable set keep/partition operations", () => { let a0 = Belt_MutableSetInt.fromArray(Array_data_util.randomRange(0, 1000)); @@ -148,8 +146,8 @@ Mocha.describe("Bs_mutable_set_test", () => { let match = Belt_MutableSetInt.partition(a0, x => x % 2 === 0); let a4 = match[1]; let a3 = match[0]; - Test_utils.ok("File \"bs_mutable_set_test.res\", line 153, characters 7-14", Belt_MutableSetInt.eq(a1, a3)); - Test_utils.ok("File \"bs_mutable_set_test.res\", line 154, characters 7-14", Belt_MutableSetInt.eq(a2, a4)); + Test_utils.ok("File \"bs_mutable_set_test.res\", line 151, characters 7-14", Belt_MutableSetInt.eq(a1, a3)); + Test_utils.ok("File \"bs_mutable_set_test.res\", line 152, characters 7-14", Belt_MutableSetInt.eq(a2, a4)); Belt_List.forEach({ hd: a0, tl: { @@ -173,45 +171,45 @@ Mocha.describe("Bs_mutable_set_test", () => { Belt_MutableSetInt.add(v, i); } Belt_MutableSetInt.checkInvariantInternal(v); - Test_utils.ok("File \"bs_mutable_set_test.res\", line 164, characters 7-14", Belt_Range.every(0, 100000, i => Belt_MutableSetInt.has(v, i))); - Test_utils.eq("File \"bs_mutable_set_test.res\", line 165, characters 7-14", Belt_MutableSetInt.size(v), 100001); + Test_utils.ok("File \"bs_mutable_set_test.res\", line 162, characters 7-14", Belt_Range.every(0, 100000, i => Belt_MutableSetInt.has(v, i))); + Test_utils.eq("File \"bs_mutable_set_test.res\", line 163, characters 7-14", Belt_MutableSetInt.size(v), 100001); }); Mocha.test("mutable set merge operations", () => { let u = Belt_Array.concat(Array_data_util.randomRange(30, 100), Array_data_util.randomRange(40, 120)); let v = Belt_MutableSetInt.make(); Belt_MutableSetInt.mergeMany(v, u); - Test_utils.eq("File \"bs_mutable_set_test.res\", line 172, characters 7-14", Belt_MutableSetInt.size(v), 91); - Test_utils.eq("File \"bs_mutable_set_test.res\", line 173, characters 7-14", Belt_MutableSetInt.toArray(v), Array_data_util.range(30, 120)); + Test_utils.eq("File \"bs_mutable_set_test.res\", line 170, characters 7-14", Belt_MutableSetInt.size(v), 91); + Test_utils.eq("File \"bs_mutable_set_test.res\", line 171, characters 7-14", Belt_MutableSetInt.toArray(v), Array_data_util.range(30, 120)); }); Mocha.test("mutable set remove many operations", () => { let u = Belt_Array.concat(Array_data_util.randomRange(0, 100000), Array_data_util.randomRange(0, 100)); let v = Belt_MutableSetInt.fromArray(u); - Test_utils.eq("File \"bs_mutable_set_test.res\", line 179, characters 7-14", Belt_MutableSetInt.size(v), 100001); + Test_utils.eq("File \"bs_mutable_set_test.res\", line 177, characters 7-14", Belt_MutableSetInt.size(v), 100001); let u$1 = Array_data_util.randomRange(50000, 80000); for (let i = 0, i_finish = u$1.length; i < i_finish; ++i) { Belt_MutableSetInt.remove(v, i); } - Test_utils.eq("File \"bs_mutable_set_test.res\", line 186, characters 7-14", Belt_MutableSetInt.size(v), 70000); + Test_utils.eq("File \"bs_mutable_set_test.res\", line 184, characters 7-14", Belt_MutableSetInt.size(v), 70000); let vv = Array_data_util.randomRange(0, 100000); for (let i$1 = 0, i_finish$1 = vv.length; i$1 < i_finish$1; ++i$1) { Belt_MutableSetInt.remove(v, vv[i$1]); } - Test_utils.eq("File \"bs_mutable_set_test.res\", line 192, characters 7-14", Belt_MutableSetInt.size(v), 0); - Test_utils.ok("File \"bs_mutable_set_test.res\", line 193, characters 7-14", Belt_MutableSetInt.isEmpty(v)); + Test_utils.eq("File \"bs_mutable_set_test.res\", line 190, characters 7-14", Belt_MutableSetInt.size(v), 0); + Test_utils.ok("File \"bs_mutable_set_test.res\", line 191, characters 7-14", Belt_MutableSetInt.isEmpty(v)); }); Mocha.test("mutable set min/max operations", () => { let v = Belt_MutableSetInt.fromArray(Belt_Array.makeBy(30, i => i)); Belt_MutableSetInt.remove(v, 30); Belt_MutableSetInt.remove(v, 29); - Test_utils.ok("File \"bs_mutable_set_test.res\", line 200, characters 7-14", 28 === Belt_MutableSetInt.maxUndefined(v)); + Test_utils.eq("File \"bs_mutable_set_test.res\", line 198, characters 7-14", Belt_MutableSetInt.maximum(v), 28); Belt_MutableSetInt.remove(v, 0); - Test_utils.ok("File \"bs_mutable_set_test.res\", line 202, characters 7-14", 1 === Belt_MutableSetInt.minUndefined(v)); - Test_utils.eq("File \"bs_mutable_set_test.res\", line 203, characters 7-14", Belt_MutableSetInt.size(v), 28); + Test_utils.eq("File \"bs_mutable_set_test.res\", line 200, characters 7-14", Belt_MutableSetInt.minimum(v), 1); + Test_utils.eq("File \"bs_mutable_set_test.res\", line 201, characters 7-14", Belt_MutableSetInt.size(v), 28); let vv = Array_data_util.randomRange(1, 28); for (let i = 0, i_finish = vv.length; i < i_finish; ++i) { Belt_MutableSetInt.remove(v, vv[i]); } - Test_utils.eq("File \"bs_mutable_set_test.res\", line 208, characters 7-14", Belt_MutableSetInt.size(v), 0); + Test_utils.eq("File \"bs_mutable_set_test.res\", line 206, characters 7-14", Belt_MutableSetInt.size(v), 0); }); Mocha.test("mutable set fromSortedArrayUnsafe", () => { let id = (loc, x) => { @@ -219,31 +217,31 @@ Mocha.describe("Bs_mutable_set_test", () => { Belt_MutableSetInt.checkInvariantInternal(u); Test_utils.ok(loc, Belt_Array.every2(Belt_MutableSetInt.toArray(u), x, (x, y) => x === y)); }; - id("File \"bs_mutable_set_test.res\", line 218, characters 7-14", []); - id("File \"bs_mutable_set_test.res\", line 219, characters 7-14", [0]); - id("File \"bs_mutable_set_test.res\", line 220, characters 7-14", [ + id("File \"bs_mutable_set_test.res\", line 216, characters 7-14", []); + id("File \"bs_mutable_set_test.res\", line 217, characters 7-14", [0]); + id("File \"bs_mutable_set_test.res\", line 218, characters 7-14", [ 0, 1 ]); - id("File \"bs_mutable_set_test.res\", line 221, characters 7-14", [ + id("File \"bs_mutable_set_test.res\", line 219, characters 7-14", [ 0, 1, 2 ]); - id("File \"bs_mutable_set_test.res\", line 222, characters 7-14", [ + id("File \"bs_mutable_set_test.res\", line 220, characters 7-14", [ 0, 1, 2, 3 ]); - id("File \"bs_mutable_set_test.res\", line 223, characters 7-14", [ + id("File \"bs_mutable_set_test.res\", line 221, characters 7-14", [ 0, 1, 2, 3, 4 ]); - id("File \"bs_mutable_set_test.res\", line 224, characters 7-14", [ + id("File \"bs_mutable_set_test.res\", line 222, characters 7-14", [ 0, 1, 2, @@ -251,7 +249,7 @@ Mocha.describe("Bs_mutable_set_test", () => { 4, 5 ]); - id("File \"bs_mutable_set_test.res\", line 225, characters 7-14", [ + id("File \"bs_mutable_set_test.res\", line 223, characters 7-14", [ 0, 1, 2, @@ -259,7 +257,7 @@ Mocha.describe("Bs_mutable_set_test", () => { 4, 6 ]); - id("File \"bs_mutable_set_test.res\", line 226, characters 7-14", [ + id("File \"bs_mutable_set_test.res\", line 224, characters 7-14", [ 0, 1, 2, @@ -268,7 +266,7 @@ Mocha.describe("Bs_mutable_set_test", () => { 6, 7 ]); - id("File \"bs_mutable_set_test.res\", line 227, characters 7-14", [ + id("File \"bs_mutable_set_test.res\", line 225, characters 7-14", [ 0, 1, 2, @@ -278,7 +276,7 @@ Mocha.describe("Bs_mutable_set_test", () => { 7, 8 ]); - id("File \"bs_mutable_set_test.res\", line 228, characters 7-14", [ + id("File \"bs_mutable_set_test.res\", line 226, characters 7-14", [ 0, 1, 2, @@ -289,7 +287,7 @@ Mocha.describe("Bs_mutable_set_test", () => { 8, 9 ]); - id("File \"bs_mutable_set_test.res\", line 229, characters 7-14", Array_data_util.range(0, 1000)); + id("File \"bs_mutable_set_test.res\", line 227, characters 7-14", Array_data_util.range(0, 1000)); }); Mocha.test("mutable set keep/partition with mod 8", () => { let v = Belt_MutableSetInt.fromArray(Array_data_util.randomRange(0, 1000)); @@ -299,35 +297,35 @@ Mocha.describe("Bs_mutable_set_test", () => { for (let i = 0; i <= 200; ++i) { Belt_MutableSetInt.remove(v, i); } - Test_utils.eq("File \"bs_mutable_set_test.res\", line 240, characters 7-14", Belt_MutableSetInt.size(copyV), 126); - Test_utils.eq("File \"bs_mutable_set_test.res\", line 241, characters 7-14", Belt_MutableSetInt.toArray(copyV), Belt_Array.makeBy(126, i => (i << 3))); - Test_utils.eq("File \"bs_mutable_set_test.res\", line 242, characters 7-14", Belt_MutableSetInt.size(v), 800); - Test_utils.ok("File \"bs_mutable_set_test.res\", line 243, characters 7-14", Belt_MutableSetInt.eq(copyV, match[0])); - Test_utils.ok("File \"bs_mutable_set_test.res\", line 244, characters 7-14", Belt_MutableSetInt.eq(cc, match[1])); + Test_utils.eq("File \"bs_mutable_set_test.res\", line 238, characters 7-14", Belt_MutableSetInt.size(copyV), 126); + Test_utils.eq("File \"bs_mutable_set_test.res\", line 239, characters 7-14", Belt_MutableSetInt.toArray(copyV), Belt_Array.makeBy(126, i => (i << 3))); + Test_utils.eq("File \"bs_mutable_set_test.res\", line 240, characters 7-14", Belt_MutableSetInt.size(v), 800); + Test_utils.ok("File \"bs_mutable_set_test.res\", line 241, characters 7-14", Belt_MutableSetInt.eq(copyV, match[0])); + Test_utils.ok("File \"bs_mutable_set_test.res\", line 242, characters 7-14", Belt_MutableSetInt.eq(cc, match[1])); }); Mocha.test("mutable set split operations", () => { let v = Belt_MutableSetInt.fromArray(Array_data_util.randomRange(0, 1000)); let match = Belt_MutableSetInt.split(v, 400); let match$1 = match[0]; - Test_utils.ok("File \"bs_mutable_set_test.res\", line 250, characters 7-14", Belt_MutableSetInt.eq(match$1[0], Belt_MutableSetInt.fromArray(Array_data_util.randomRange(0, 399)))); - Test_utils.ok("File \"bs_mutable_set_test.res\", line 251, characters 7-14", Belt_MutableSetInt.eq(match$1[1], Belt_MutableSetInt.fromArray(Array_data_util.randomRange(401, 1000)))); + Test_utils.ok("File \"bs_mutable_set_test.res\", line 248, characters 7-14", Belt_MutableSetInt.eq(match$1[0], Belt_MutableSetInt.fromArray(Array_data_util.randomRange(0, 399)))); + Test_utils.ok("File \"bs_mutable_set_test.res\", line 249, characters 7-14", Belt_MutableSetInt.eq(match$1[1], Belt_MutableSetInt.fromArray(Array_data_util.randomRange(401, 1000)))); let d = Belt_MutableSetInt.fromArray(Belt_Array.map(Array_data_util.randomRange(0, 1000), x => (x << 1))); let match$2 = Belt_MutableSetInt.split(d, 1001); let match$3 = match$2[0]; - Test_utils.ok("File \"bs_mutable_set_test.res\", line 254, characters 7-14", Belt_MutableSetInt.eq(match$3[0], Belt_MutableSetInt.fromArray(Belt_Array.makeBy(501, x => (x << 1))))); - Test_utils.ok("File \"bs_mutable_set_test.res\", line 255, characters 7-14", Belt_MutableSetInt.eq(match$3[1], Belt_MutableSetInt.fromArray(Belt_Array.makeBy(500, x => 1002 + (x << 1) | 0)))); + Test_utils.ok("File \"bs_mutable_set_test.res\", line 252, characters 7-14", Belt_MutableSetInt.eq(match$3[0], Belt_MutableSetInt.fromArray(Belt_Array.makeBy(501, x => (x << 1))))); + Test_utils.ok("File \"bs_mutable_set_test.res\", line 253, characters 7-14", Belt_MutableSetInt.eq(match$3[1], Belt_MutableSetInt.fromArray(Belt_Array.makeBy(500, x => 1002 + (x << 1) | 0)))); }); Mocha.test("mutable set final union operations", () => { let aa = Belt_MutableSetInt.fromArray(Array_data_util.randomRange(0, 100)); let bb = Belt_MutableSetInt.fromArray(Array_data_util.randomRange(40, 120)); let cc = Belt_MutableSetInt.union(aa, bb); - Test_utils.ok("File \"bs_mutable_set_test.res\", line 265, characters 7-14", Belt_MutableSetInt.eq(cc, Belt_MutableSetInt.fromArray(Array_data_util.randomRange(0, 120)))); - Test_utils.ok("File \"bs_mutable_set_test.res\", line 268, characters 6-13", Belt_MutableSetInt.eq(Belt_MutableSetInt.union(Belt_MutableSetInt.fromArray(Array_data_util.randomRange(0, 20)), Belt_MutableSetInt.fromArray(Array_data_util.randomRange(21, 40))), Belt_MutableSetInt.fromArray(Array_data_util.randomRange(0, 40)))); + Test_utils.ok("File \"bs_mutable_set_test.res\", line 263, characters 7-14", Belt_MutableSetInt.eq(cc, Belt_MutableSetInt.fromArray(Array_data_util.randomRange(0, 120)))); + Test_utils.ok("File \"bs_mutable_set_test.res\", line 266, characters 6-13", Belt_MutableSetInt.eq(Belt_MutableSetInt.union(Belt_MutableSetInt.fromArray(Array_data_util.randomRange(0, 20)), Belt_MutableSetInt.fromArray(Array_data_util.randomRange(21, 40))), Belt_MutableSetInt.fromArray(Array_data_util.randomRange(0, 40)))); let dd = Belt_MutableSetInt.intersect(aa, bb); - Test_utils.ok("File \"bs_mutable_set_test.res\", line 272, characters 7-14", Belt_MutableSetInt.eq(dd, Belt_MutableSetInt.fromArray(Array_data_util.randomRange(40, 100)))); - Test_utils.ok("File \"bs_mutable_set_test.res\", line 273, characters 7-14", Belt_MutableSetInt.eq(Belt_MutableSetInt.intersect(Belt_MutableSetInt.fromArray(Array_data_util.randomRange(0, 20)), Belt_MutableSetInt.fromArray(Array_data_util.randomRange(21, 40))), Belt_MutableSetInt.make())); - Test_utils.ok("File \"bs_mutable_set_test.res\", line 274, characters 7-14", Belt_MutableSetInt.eq(Belt_MutableSetInt.intersect(Belt_MutableSetInt.fromArray(Array_data_util.randomRange(21, 40)), Belt_MutableSetInt.fromArray(Array_data_util.randomRange(0, 20))), Belt_MutableSetInt.make())); - Test_utils.ok("File \"bs_mutable_set_test.res\", line 275, characters 7-14", Belt_MutableSetInt.eq(Belt_MutableSetInt.intersect(Belt_MutableSetInt.fromArray([ + Test_utils.ok("File \"bs_mutable_set_test.res\", line 270, characters 7-14", Belt_MutableSetInt.eq(dd, Belt_MutableSetInt.fromArray(Array_data_util.randomRange(40, 100)))); + Test_utils.ok("File \"bs_mutable_set_test.res\", line 271, characters 7-14", Belt_MutableSetInt.eq(Belt_MutableSetInt.intersect(Belt_MutableSetInt.fromArray(Array_data_util.randomRange(0, 20)), Belt_MutableSetInt.fromArray(Array_data_util.randomRange(21, 40))), Belt_MutableSetInt.make())); + Test_utils.ok("File \"bs_mutable_set_test.res\", line 272, characters 7-14", Belt_MutableSetInt.eq(Belt_MutableSetInt.intersect(Belt_MutableSetInt.fromArray(Array_data_util.randomRange(21, 40)), Belt_MutableSetInt.fromArray(Array_data_util.randomRange(0, 20))), Belt_MutableSetInt.make())); + Test_utils.ok("File \"bs_mutable_set_test.res\", line 273, characters 7-14", Belt_MutableSetInt.eq(Belt_MutableSetInt.intersect(Belt_MutableSetInt.fromArray([ 1, 3, 4, @@ -345,11 +343,11 @@ Mocha.describe("Bs_mutable_set_test", () => { 4, 5 ]))); - Test_utils.ok("File \"bs_mutable_set_test.res\", line 276, characters 7-14", Belt_MutableSetInt.eq(Belt_MutableSetInt.diff(aa, bb), Belt_MutableSetInt.fromArray(Array_data_util.randomRange(0, 39)))); - Test_utils.ok("File \"bs_mutable_set_test.res\", line 277, characters 7-14", Belt_MutableSetInt.eq(Belt_MutableSetInt.diff(bb, aa), Belt_MutableSetInt.fromArray(Array_data_util.randomRange(101, 120)))); - Test_utils.ok("File \"bs_mutable_set_test.res\", line 279, characters 6-13", Belt_MutableSetInt.eq(Belt_MutableSetInt.diff(Belt_MutableSetInt.fromArray(Array_data_util.randomRange(21, 40)), Belt_MutableSetInt.fromArray(Array_data_util.randomRange(0, 20))), Belt_MutableSetInt.fromArray(Array_data_util.randomRange(21, 40)))); - Test_utils.ok("File \"bs_mutable_set_test.res\", line 283, characters 6-13", Belt_MutableSetInt.eq(Belt_MutableSetInt.diff(Belt_MutableSetInt.fromArray(Array_data_util.randomRange(0, 20)), Belt_MutableSetInt.fromArray(Array_data_util.randomRange(21, 40))), Belt_MutableSetInt.fromArray(Array_data_util.randomRange(0, 20)))); - Test_utils.ok("File \"bs_mutable_set_test.res\", line 288, characters 6-13", Belt_MutableSetInt.eq(Belt_MutableSetInt.diff(Belt_MutableSetInt.fromArray(Array_data_util.randomRange(0, 20)), Belt_MutableSetInt.fromArray(Array_data_util.randomRange(0, 40))), Belt_MutableSetInt.fromArray(Array_data_util.randomRange(0, -1)))); + Test_utils.ok("File \"bs_mutable_set_test.res\", line 274, characters 7-14", Belt_MutableSetInt.eq(Belt_MutableSetInt.diff(aa, bb), Belt_MutableSetInt.fromArray(Array_data_util.randomRange(0, 39)))); + Test_utils.ok("File \"bs_mutable_set_test.res\", line 275, characters 7-14", Belt_MutableSetInt.eq(Belt_MutableSetInt.diff(bb, aa), Belt_MutableSetInt.fromArray(Array_data_util.randomRange(101, 120)))); + Test_utils.ok("File \"bs_mutable_set_test.res\", line 277, characters 6-13", Belt_MutableSetInt.eq(Belt_MutableSetInt.diff(Belt_MutableSetInt.fromArray(Array_data_util.randomRange(21, 40)), Belt_MutableSetInt.fromArray(Array_data_util.randomRange(0, 20))), Belt_MutableSetInt.fromArray(Array_data_util.randomRange(21, 40)))); + Test_utils.ok("File \"bs_mutable_set_test.res\", line 281, characters 6-13", Belt_MutableSetInt.eq(Belt_MutableSetInt.diff(Belt_MutableSetInt.fromArray(Array_data_util.randomRange(0, 20)), Belt_MutableSetInt.fromArray(Array_data_util.randomRange(21, 40))), Belt_MutableSetInt.fromArray(Array_data_util.randomRange(0, 20)))); + Test_utils.ok("File \"bs_mutable_set_test.res\", line 286, characters 6-13", Belt_MutableSetInt.eq(Belt_MutableSetInt.diff(Belt_MutableSetInt.fromArray(Array_data_util.randomRange(0, 20)), Belt_MutableSetInt.fromArray(Array_data_util.randomRange(0, 40))), Belt_MutableSetInt.fromArray(Array_data_util.randomRange(0, -1)))); }); }); diff --git a/tests/tests/src/bs_mutable_set_test.res b/tests/tests/src/bs_mutable_set_test.res index 11a8375bfaf..d1122933710 100644 --- a/tests/tests/src/bs_mutable_set_test.res +++ b/tests/tests/src/bs_mutable_set_test.res @@ -19,8 +19,8 @@ describe(__MODULE__, () => { ok(__LOC__, N.removeCheck(u, 20)) eq(__LOC__, N.size(u), 28) let r = I.randomRange(0, 30) - ok(__LOC__, Js.eqUndefined(29, N.maxUndefined(u))) - ok(__LOC__, Js.eqUndefined(1, N.minUndefined(u))) + eq(__LOC__, N.maximum(u), Some(29)) + eq(__LOC__, N.minimum(u), Some(1)) N.add(u, 3) for i in 0 to A.length(r) - 1 { N.remove(u, A.getUnsafe(r, i)) @@ -85,8 +85,6 @@ describe(__MODULE__, () => { ok(__LOC__, N.isEmpty(empty())) eq(__LOC__, N.minimum(v), Some(500)) eq(__LOC__, N.maximum(v), Some(2000)) - eq(__LOC__, N.minUndefined(v), Js.Undefined.return(500)) - eq(__LOC__, N.maxUndefined(v), Js.Undefined.return(2000)) eq(__LOC__, N.reduce(v, 0, (x, y) => x + y), (500 + 2000) / 2 * 1501) ok(__LOC__, L.eq(N.toList(v), L.makeBy(1_501, i => i + 500), (x, y) => x == y)) eq(__LOC__, N.toArray(v), I.range(500, 2000)) @@ -197,9 +195,9 @@ describe(__MODULE__, () => { let v = N.fromArray(A.makeBy(30, i => i)) N.remove(v, 30) N.remove(v, 29) - ok(__LOC__, Js.eqUndefined(28, N.maxUndefined(v))) + eq(__LOC__, N.maximum(v), Some(28)) N.remove(v, 0) - ok(__LOC__, Js.eqUndefined(1, N.minUndefined(v))) + eq(__LOC__, N.minimum(v), Some(1)) eq(__LOC__, N.size(v), 28) let vv = I.randomRange(1, 28) for i in 0 to A.length(vv) - 1 { diff --git a/tests/tests/src/bs_poly_map_test.mjs b/tests/tests/src/bs_poly_map_test.mjs index 99003ea15c9..4a24f1e4c10 100644 --- a/tests/tests/src/bs_poly_map_test.mjs +++ b/tests/tests/src/bs_poly_map_test.mjs @@ -8,6 +8,7 @@ import * as Belt_Array from "@rescript/runtime/lib/es6/Belt_Array.mjs"; import * as Test_utils from "./test_utils.mjs"; import * as Primitive_int from "@rescript/runtime/lib/es6/Primitive_int.mjs"; import * as Array_data_util from "./array_data_util.mjs"; +import * as Primitive_object from "@rescript/runtime/lib/es6/Primitive_object.mjs"; import * as Primitive_option from "@rescript/runtime/lib/es6/Primitive_option.mjs"; let Icmp = Belt_Id.comparable(Primitive_int.compare); @@ -85,11 +86,11 @@ Mocha.describe("Bs_poly_map_test", () => { Test_utils.ok("File \"bs_poly_map_test.res\", line 88, characters 7-14", a5 === a6); Test_utils.ok("File \"bs_poly_map_test.res\", line 89, characters 7-14", Belt_Map.has(a0, 3)); Test_utils.ok("File \"bs_poly_map_test.res\", line 90, characters 7-14", !Belt_Map.has(a5, 3)); - Test_utils.ok("File \"bs_poly_map_test.res\", line 91, characters 7-14", 3 === Belt_Map.getUndefined(a0, 3)); - Test_utils.ok("File \"bs_poly_map_test.res\", line 92, characters 7-14", 33 === Belt_Map.getUndefined(a1, 3)); - Test_utils.ok("File \"bs_poly_map_test.res\", line 93, characters 7-14", Belt_Map.getUndefined(a2, 3) === undefined); - Test_utils.ok("File \"bs_poly_map_test.res\", line 95, characters 7-14", 11 === Belt_Map.getUndefined(a3, 3)); - Test_utils.ok("File \"bs_poly_map_test.res\", line 96, characters 7-14", Belt_Map.getUndefined(a4, 3) === undefined); + Test_utils.ok("File \"bs_poly_map_test.res\", line 91, characters 7-14", Primitive_object.equal(Belt_Map.get(a0, 3), 3)); + Test_utils.ok("File \"bs_poly_map_test.res\", line 92, characters 7-14", Primitive_object.equal(Belt_Map.get(a1, 3), 33)); + Test_utils.ok("File \"bs_poly_map_test.res\", line 93, characters 7-14", Belt_Map.get(a2, 3) === undefined); + Test_utils.ok("File \"bs_poly_map_test.res\", line 95, characters 7-14", Primitive_object.equal(Belt_Map.get(a3, 3), 11)); + Test_utils.ok("File \"bs_poly_map_test.res\", line 96, characters 7-14", Belt_Map.get(a4, 3) === undefined); let a7 = Belt_Map.removeMany(a0, [ 7, 8, diff --git a/tests/tests/src/bs_poly_map_test.res b/tests/tests/src/bs_poly_map_test.res index 53f06932665..42c0ff5438f 100644 --- a/tests/tests/src/bs_poly_map_test.res +++ b/tests/tests/src/bs_poly_map_test.res @@ -88,12 +88,12 @@ describe(__MODULE__, () => { ok(__LOC__, a5 === a6) ok(__LOC__, M.has(a0, 3)) ok(__LOC__, !M.has(a5, 3)) - ok(__LOC__, Js.eqUndefined(3, M.getUndefined(a0, 3))) - ok(__LOC__, Js.eqUndefined(33, M.getUndefined(a1, 3))) - ok(__LOC__, M.getUndefined(a2, 3) == Js.undefined) + ok(__LOC__, M.get(a0, 3) == Some(3)) + ok(__LOC__, M.get(a1, 3) == Some(33)) + ok(__LOC__, M.get(a2, 3) == None) - ok(__LOC__, Js.eqUndefined(11, M.getUndefined(a3, 3))) - ok(__LOC__, M.getUndefined(a4, 3) == Js.undefined) + ok(__LOC__, M.get(a3, 3) == Some(11)) + ok(__LOC__, M.get(a4, 3) == None) let a7 = M.removeMany(a0, [7, 8, 0, 1, 3, 2, 4, 922, 4, 5, 6]) eq(__LOC__, M.keysToArray(a7), [9, 10]) diff --git a/tests/tests/src/bs_poly_mutable_set_test.mjs b/tests/tests/src/bs_poly_mutable_set_test.mjs index 058a61c5535..40c03e50675 100644 --- a/tests/tests/src/bs_poly_mutable_set_test.mjs +++ b/tests/tests/src/bs_poly_mutable_set_test.mjs @@ -28,8 +28,8 @@ Mocha.describe("Bs_poly_mutable_set_test", () => { Test_utils.ok("File \"bs_poly_mutable_set_test.res\", line 18, characters 7-14", Belt_MutableSet.removeCheck(u, 20)); Test_utils.eq("File \"bs_poly_mutable_set_test.res\", line 19, characters 7-14", Belt_MutableSet.size(u), 28); let r = Array_data_util.randomRange(0, 30); - Test_utils.ok("File \"bs_poly_mutable_set_test.res\", line 21, characters 7-14", 29 === Belt_MutableSet.maxUndefined(u)); - Test_utils.ok("File \"bs_poly_mutable_set_test.res\", line 22, characters 7-14", 1 === Belt_MutableSet.minUndefined(u)); + Test_utils.eq("File \"bs_poly_mutable_set_test.res\", line 21, characters 7-14", Belt_MutableSet.maximum(u), 29); + Test_utils.eq("File \"bs_poly_mutable_set_test.res\", line 22, characters 7-14", Belt_MutableSet.minimum(u), 1); Belt_MutableSet.add(u, 3); for (let i = 0, i_finish = r.length; i < i_finish; ++i) { Belt_MutableSet.remove(u, r[i]); @@ -87,48 +87,46 @@ Mocha.describe("Bs_poly_mutable_set_test", () => { Test_utils.ok("File \"bs_poly_mutable_set_test.res\", line 84, characters 7-14", Belt_MutableSet.isEmpty(Belt_MutableSet.make(IntCmp))); Test_utils.eq("File \"bs_poly_mutable_set_test.res\", line 85, characters 7-14", Belt_MutableSet.minimum(v), 500); Test_utils.eq("File \"bs_poly_mutable_set_test.res\", line 86, characters 7-14", Belt_MutableSet.maximum(v), 2000); - Test_utils.eq("File \"bs_poly_mutable_set_test.res\", line 87, characters 7-14", Belt_MutableSet.minUndefined(v), 500); - Test_utils.eq("File \"bs_poly_mutable_set_test.res\", line 88, characters 7-14", Belt_MutableSet.maxUndefined(v), 2000); - Test_utils.eq("File \"bs_poly_mutable_set_test.res\", line 89, characters 7-14", Belt_MutableSet.reduce(v, 0, (x, y) => x + y | 0), 1876250); - Test_utils.ok("File \"bs_poly_mutable_set_test.res\", line 90, characters 7-14", Belt_List.eq(Belt_MutableSet.toList(v), Belt_List.makeBy(1501, i => i + 500 | 0), (x, y) => x === y)); - Test_utils.eq("File \"bs_poly_mutable_set_test.res\", line 91, characters 7-14", Belt_MutableSet.toArray(v), Array_data_util.range(500, 2000)); + Test_utils.eq("File \"bs_poly_mutable_set_test.res\", line 87, characters 7-14", Belt_MutableSet.reduce(v, 0, (x, y) => x + y | 0), 1876250); + Test_utils.ok("File \"bs_poly_mutable_set_test.res\", line 88, characters 7-14", Belt_List.eq(Belt_MutableSet.toList(v), Belt_List.makeBy(1501, i => i + 500 | 0), (x, y) => x === y)); + Test_utils.eq("File \"bs_poly_mutable_set_test.res\", line 89, characters 7-14", Belt_MutableSet.toArray(v), Array_data_util.range(500, 2000)); Belt_MutableSet.checkInvariantInternal(v); - Test_utils.eq("File \"bs_poly_mutable_set_test.res\", line 93, characters 7-14", Belt_MutableSet.get(v, 3), undefined); - Test_utils.eq("File \"bs_poly_mutable_set_test.res\", line 94, characters 7-14", Belt_MutableSet.get(v, 1200), 1200); + Test_utils.eq("File \"bs_poly_mutable_set_test.res\", line 91, characters 7-14", Belt_MutableSet.get(v, 3), undefined); + Test_utils.eq("File \"bs_poly_mutable_set_test.res\", line 92, characters 7-14", Belt_MutableSet.get(v, 1200), 1200); let match = Belt_MutableSet.split(v, 1000); let match$1 = match[0]; let bb = match$1[1]; let aa = match$1[0]; - Test_utils.ok("File \"bs_poly_mutable_set_test.res\", line 96, characters 7-14", match[1]); - Test_utils.ok("File \"bs_poly_mutable_set_test.res\", line 97, characters 7-14", Belt_Array.eq(Belt_MutableSet.toArray(aa), Array_data_util.range(500, 999), (x, y) => x === y)); - Test_utils.ok("File \"bs_poly_mutable_set_test.res\", line 98, characters 7-14", Belt_Array.eq(Belt_MutableSet.toArray(bb), Array_data_util.range(1001, 2000), (x, y) => x === y)); - Test_utils.ok("File \"bs_poly_mutable_set_test.res\", line 99, characters 7-14", Belt_MutableSet.subset(aa, v)); - Test_utils.ok("File \"bs_poly_mutable_set_test.res\", line 100, characters 7-14", Belt_MutableSet.subset(bb, v)); - Test_utils.ok("File \"bs_poly_mutable_set_test.res\", line 101, characters 7-14", Belt_MutableSet.isEmpty(Belt_MutableSet.intersect(aa, bb))); + Test_utils.ok("File \"bs_poly_mutable_set_test.res\", line 94, characters 7-14", match[1]); + Test_utils.ok("File \"bs_poly_mutable_set_test.res\", line 95, characters 7-14", Belt_Array.eq(Belt_MutableSet.toArray(aa), Array_data_util.range(500, 999), (x, y) => x === y)); + Test_utils.ok("File \"bs_poly_mutable_set_test.res\", line 96, characters 7-14", Belt_Array.eq(Belt_MutableSet.toArray(bb), Array_data_util.range(1001, 2000), (x, y) => x === y)); + Test_utils.ok("File \"bs_poly_mutable_set_test.res\", line 97, characters 7-14", Belt_MutableSet.subset(aa, v)); + Test_utils.ok("File \"bs_poly_mutable_set_test.res\", line 98, characters 7-14", Belt_MutableSet.subset(bb, v)); + Test_utils.ok("File \"bs_poly_mutable_set_test.res\", line 99, characters 7-14", Belt_MutableSet.isEmpty(Belt_MutableSet.intersect(aa, bb))); let c = Belt_MutableSet.removeCheck(v, 1000); - Test_utils.ok("File \"bs_poly_mutable_set_test.res\", line 103, characters 7-14", c); + Test_utils.ok("File \"bs_poly_mutable_set_test.res\", line 101, characters 7-14", c); let match$2 = Belt_MutableSet.split(v, 1000); let match$3 = match$2[0]; let bb$1 = match$3[1]; let aa$1 = match$3[0]; - Test_utils.ok("File \"bs_poly_mutable_set_test.res\", line 105, characters 7-14", !match$2[1]); - Test_utils.ok("File \"bs_poly_mutable_set_test.res\", line 106, characters 7-14", Belt_Array.eq(Belt_MutableSet.toArray(aa$1), Array_data_util.range(500, 999), (x, y) => x === y)); - Test_utils.ok("File \"bs_poly_mutable_set_test.res\", line 107, characters 7-14", Belt_Array.eq(Belt_MutableSet.toArray(bb$1), Array_data_util.range(1001, 2000), (x, y) => x === y)); - Test_utils.ok("File \"bs_poly_mutable_set_test.res\", line 108, characters 7-14", Belt_MutableSet.subset(aa$1, v)); - Test_utils.ok("File \"bs_poly_mutable_set_test.res\", line 109, characters 7-14", Belt_MutableSet.subset(bb$1, v)); - Test_utils.ok("File \"bs_poly_mutable_set_test.res\", line 110, characters 7-14", Belt_MutableSet.isEmpty(Belt_MutableSet.intersect(aa$1, bb$1))); + Test_utils.ok("File \"bs_poly_mutable_set_test.res\", line 103, characters 7-14", !match$2[1]); + Test_utils.ok("File \"bs_poly_mutable_set_test.res\", line 104, characters 7-14", Belt_Array.eq(Belt_MutableSet.toArray(aa$1), Array_data_util.range(500, 999), (x, y) => x === y)); + Test_utils.ok("File \"bs_poly_mutable_set_test.res\", line 105, characters 7-14", Belt_Array.eq(Belt_MutableSet.toArray(bb$1), Array_data_util.range(1001, 2000), (x, y) => x === y)); + Test_utils.ok("File \"bs_poly_mutable_set_test.res\", line 106, characters 7-14", Belt_MutableSet.subset(aa$1, v)); + Test_utils.ok("File \"bs_poly_mutable_set_test.res\", line 107, characters 7-14", Belt_MutableSet.subset(bb$1, v)); + Test_utils.ok("File \"bs_poly_mutable_set_test.res\", line 108, characters 7-14", Belt_MutableSet.isEmpty(Belt_MutableSet.intersect(aa$1, bb$1))); }); Mocha.test("mutable set union and intersection operations", () => { let aa = Belt_MutableSet.fromArray(Array_data_util.randomRange(0, 100), IntCmp); let bb = Belt_MutableSet.fromArray(Array_data_util.randomRange(40, 120), IntCmp); let cc = Belt_MutableSet.union(aa, bb); - Test_utils.ok("File \"bs_poly_mutable_set_test.res\", line 120, characters 7-14", Belt_MutableSet.eq(cc, Belt_MutableSet.fromArray(Array_data_util.randomRange(0, 120), IntCmp))); - Test_utils.ok("File \"bs_poly_mutable_set_test.res\", line 123, characters 6-13", Belt_MutableSet.eq(Belt_MutableSet.union(Belt_MutableSet.fromArray(Array_data_util.randomRange(0, 20), IntCmp), Belt_MutableSet.fromArray(Array_data_util.randomRange(21, 40), IntCmp)), Belt_MutableSet.fromArray(Array_data_util.randomRange(0, 40), IntCmp))); + Test_utils.ok("File \"bs_poly_mutable_set_test.res\", line 118, characters 7-14", Belt_MutableSet.eq(cc, Belt_MutableSet.fromArray(Array_data_util.randomRange(0, 120), IntCmp))); + Test_utils.ok("File \"bs_poly_mutable_set_test.res\", line 121, characters 6-13", Belt_MutableSet.eq(Belt_MutableSet.union(Belt_MutableSet.fromArray(Array_data_util.randomRange(0, 20), IntCmp), Belt_MutableSet.fromArray(Array_data_util.randomRange(21, 40), IntCmp)), Belt_MutableSet.fromArray(Array_data_util.randomRange(0, 40), IntCmp))); let dd = Belt_MutableSet.intersect(aa, bb); - Test_utils.ok("File \"bs_poly_mutable_set_test.res\", line 127, characters 7-14", Belt_MutableSet.eq(dd, Belt_MutableSet.fromArray(Array_data_util.randomRange(40, 100), IntCmp))); - Test_utils.ok("File \"bs_poly_mutable_set_test.res\", line 128, characters 7-14", Belt_MutableSet.eq(Belt_MutableSet.intersect(Belt_MutableSet.fromArray(Array_data_util.randomRange(0, 20), IntCmp), Belt_MutableSet.fromArray(Array_data_util.randomRange(21, 40), IntCmp)), Belt_MutableSet.make(IntCmp))); - Test_utils.ok("File \"bs_poly_mutable_set_test.res\", line 129, characters 7-14", Belt_MutableSet.eq(Belt_MutableSet.intersect(Belt_MutableSet.fromArray(Array_data_util.randomRange(21, 40), IntCmp), Belt_MutableSet.fromArray(Array_data_util.randomRange(0, 20), IntCmp)), Belt_MutableSet.make(IntCmp))); - Test_utils.ok("File \"bs_poly_mutable_set_test.res\", line 130, characters 7-14", Belt_MutableSet.eq(Belt_MutableSet.intersect(Belt_MutableSet.fromArray([ + Test_utils.ok("File \"bs_poly_mutable_set_test.res\", line 125, characters 7-14", Belt_MutableSet.eq(dd, Belt_MutableSet.fromArray(Array_data_util.randomRange(40, 100), IntCmp))); + Test_utils.ok("File \"bs_poly_mutable_set_test.res\", line 126, characters 7-14", Belt_MutableSet.eq(Belt_MutableSet.intersect(Belt_MutableSet.fromArray(Array_data_util.randomRange(0, 20), IntCmp), Belt_MutableSet.fromArray(Array_data_util.randomRange(21, 40), IntCmp)), Belt_MutableSet.make(IntCmp))); + Test_utils.ok("File \"bs_poly_mutable_set_test.res\", line 127, characters 7-14", Belt_MutableSet.eq(Belt_MutableSet.intersect(Belt_MutableSet.fromArray(Array_data_util.randomRange(21, 40), IntCmp), Belt_MutableSet.fromArray(Array_data_util.randomRange(0, 20), IntCmp)), Belt_MutableSet.make(IntCmp))); + Test_utils.ok("File \"bs_poly_mutable_set_test.res\", line 128, characters 7-14", Belt_MutableSet.eq(Belt_MutableSet.intersect(Belt_MutableSet.fromArray([ 1, 3, 4, @@ -146,11 +144,11 @@ Mocha.describe("Bs_poly_mutable_set_test", () => { 4, 5 ], IntCmp))); - Test_utils.ok("File \"bs_poly_mutable_set_test.res\", line 131, characters 7-14", Belt_MutableSet.eq(Belt_MutableSet.diff(aa, bb), Belt_MutableSet.fromArray(Array_data_util.randomRange(0, 39), IntCmp))); - Test_utils.ok("File \"bs_poly_mutable_set_test.res\", line 132, characters 7-14", Belt_MutableSet.eq(Belt_MutableSet.diff(bb, aa), Belt_MutableSet.fromArray(Array_data_util.randomRange(101, 120), IntCmp))); - Test_utils.ok("File \"bs_poly_mutable_set_test.res\", line 134, characters 6-13", Belt_MutableSet.eq(Belt_MutableSet.diff(Belt_MutableSet.fromArray(Array_data_util.randomRange(21, 40), IntCmp), Belt_MutableSet.fromArray(Array_data_util.randomRange(0, 20), IntCmp)), Belt_MutableSet.fromArray(Array_data_util.randomRange(21, 40), IntCmp))); - Test_utils.ok("File \"bs_poly_mutable_set_test.res\", line 138, characters 6-13", Belt_MutableSet.eq(Belt_MutableSet.diff(Belt_MutableSet.fromArray(Array_data_util.randomRange(0, 20), IntCmp), Belt_MutableSet.fromArray(Array_data_util.randomRange(21, 40), IntCmp)), Belt_MutableSet.fromArray(Array_data_util.randomRange(0, 20), IntCmp))); - Test_utils.ok("File \"bs_poly_mutable_set_test.res\", line 143, characters 6-13", Belt_MutableSet.eq(Belt_MutableSet.diff(Belt_MutableSet.fromArray(Array_data_util.randomRange(0, 20), IntCmp), Belt_MutableSet.fromArray(Array_data_util.randomRange(0, 40), IntCmp)), Belt_MutableSet.fromArray(Array_data_util.randomRange(0, -1), IntCmp))); + Test_utils.ok("File \"bs_poly_mutable_set_test.res\", line 129, characters 7-14", Belt_MutableSet.eq(Belt_MutableSet.diff(aa, bb), Belt_MutableSet.fromArray(Array_data_util.randomRange(0, 39), IntCmp))); + Test_utils.ok("File \"bs_poly_mutable_set_test.res\", line 130, characters 7-14", Belt_MutableSet.eq(Belt_MutableSet.diff(bb, aa), Belt_MutableSet.fromArray(Array_data_util.randomRange(101, 120), IntCmp))); + Test_utils.ok("File \"bs_poly_mutable_set_test.res\", line 132, characters 6-13", Belt_MutableSet.eq(Belt_MutableSet.diff(Belt_MutableSet.fromArray(Array_data_util.randomRange(21, 40), IntCmp), Belt_MutableSet.fromArray(Array_data_util.randomRange(0, 20), IntCmp)), Belt_MutableSet.fromArray(Array_data_util.randomRange(21, 40), IntCmp))); + Test_utils.ok("File \"bs_poly_mutable_set_test.res\", line 136, characters 6-13", Belt_MutableSet.eq(Belt_MutableSet.diff(Belt_MutableSet.fromArray(Array_data_util.randomRange(0, 20), IntCmp), Belt_MutableSet.fromArray(Array_data_util.randomRange(21, 40), IntCmp)), Belt_MutableSet.fromArray(Array_data_util.randomRange(0, 20), IntCmp))); + Test_utils.ok("File \"bs_poly_mutable_set_test.res\", line 141, characters 6-13", Belt_MutableSet.eq(Belt_MutableSet.diff(Belt_MutableSet.fromArray(Array_data_util.randomRange(0, 20), IntCmp), Belt_MutableSet.fromArray(Array_data_util.randomRange(0, 40), IntCmp)), Belt_MutableSet.fromArray(Array_data_util.randomRange(0, -1), IntCmp))); }); Mocha.test("mutable set keep and partition operations", () => { let a0 = Belt_MutableSet.fromArray(Array_data_util.randomRange(0, 1000), IntCmp); @@ -159,8 +157,8 @@ Mocha.describe("Bs_poly_mutable_set_test", () => { let match = Belt_MutableSet.partition(a0, x => x % 2 === 0); let a4 = match[1]; let a3 = match[0]; - Test_utils.ok("File \"bs_poly_mutable_set_test.res\", line 152, characters 7-14", Belt_MutableSet.eq(a1, a3)); - Test_utils.ok("File \"bs_poly_mutable_set_test.res\", line 153, characters 7-14", Belt_MutableSet.eq(a2, a4)); + Test_utils.ok("File \"bs_poly_mutable_set_test.res\", line 150, characters 7-14", Belt_MutableSet.eq(a1, a3)); + Test_utils.ok("File \"bs_poly_mutable_set_test.res\", line 151, characters 7-14", Belt_MutableSet.eq(a2, a4)); Belt_List.forEach({ hd: a0, tl: { diff --git a/tests/tests/src/bs_poly_mutable_set_test.res b/tests/tests/src/bs_poly_mutable_set_test.res index d843e0f25c6..dc929290c39 100644 --- a/tests/tests/src/bs_poly_mutable_set_test.res +++ b/tests/tests/src/bs_poly_mutable_set_test.res @@ -18,8 +18,8 @@ describe(__MODULE__, () => { ok(__LOC__, N.removeCheck(u, 20)) eq(__LOC__, N.size(u), 28) let r = I.randomRange(0, 30) - ok(__LOC__, Js.eqUndefined(29, N.maxUndefined(u))) - ok(__LOC__, Js.eqUndefined(1, N.minUndefined(u))) + eq(__LOC__, N.maximum(u), Some(29)) + eq(__LOC__, N.minimum(u), Some(1)) N.add(u, 3) for i in 0 to A.length(r) - 1 { N.remove(u, A.getUnsafe(r, i)) @@ -84,8 +84,6 @@ describe(__MODULE__, () => { ok(__LOC__, N.isEmpty(empty())) eq(__LOC__, N.minimum(v), Some(500)) eq(__LOC__, N.maximum(v), Some(2000)) - eq(__LOC__, N.minUndefined(v), Js.Undefined.return(500)) - eq(__LOC__, N.maxUndefined(v), Js.Undefined.return(2000)) eq(__LOC__, N.reduce(v, 0, (x, y) => x + y), (500 + 2000) / 2 * 1501) ok(__LOC__, L.eq(N.toList(v), L.makeBy(1_501, i => i + 500), (x, y) => x == y)) eq(__LOC__, N.toArray(v), I.range(500, 2000)) diff --git a/tests/tests/src/bs_poly_set_test.mjs b/tests/tests/src/bs_poly_set_test.mjs index 1a64ff282b0..764f7b0fe0c 100644 --- a/tests/tests/src/bs_poly_set_test.mjs +++ b/tests/tests/src/bs_poly_set_test.mjs @@ -73,8 +73,8 @@ Mocha.describe("Bs_poly_set_test", () => { Test_utils.ok("File \"bs_poly_set_test.res\", line 45, characters 7-14", u0 !== u1); Test_utils.ok("File \"bs_poly_set_test.res\", line 46, characters 7-14", u2 === u1); Test_utils.eq("File \"bs_poly_set_test.res\", line 47, characters 7-14", Belt_Set.size(u4), 28); - Test_utils.ok("File \"bs_poly_set_test.res\", line 48, characters 7-14", 29 === Belt_Set.maxUndefined(u4)); - Test_utils.ok("File \"bs_poly_set_test.res\", line 49, characters 7-14", 1 === Belt_Set.minUndefined(u4)); + Test_utils.eq("File \"bs_poly_set_test.res\", line 48, characters 7-14", Belt_Set.maximum(u4), 29); + Test_utils.eq("File \"bs_poly_set_test.res\", line 49, characters 7-14", Belt_Set.minimum(u4), 1); Test_utils.ok("File \"bs_poly_set_test.res\", line 50, characters 7-14", u4 === u5); Test_utils.ok("File \"bs_poly_set_test.res\", line 51, characters 7-14", Belt_Set.isEmpty(u6)); Test_utils.eq("File \"bs_poly_set_test.res\", line 52, characters 7-14", Belt_Set.size(u7), 3); @@ -118,35 +118,31 @@ Mocha.describe("Bs_poly_set_test", () => { Test_utils.ok("File \"bs_poly_set_test.res\", line 90, characters 7-14", !Belt_Set.subset(u18, u23)); Test_utils.ok("File \"bs_poly_set_test.res\", line 91, characters 7-14", Belt_Set.subset(u22, u17)); Test_utils.ok("File \"bs_poly_set_test.res\", line 92, characters 7-14", Belt_Set.subset(u21, u17) && Belt_Set.subset(u21, u18)); - Test_utils.ok("File \"bs_poly_set_test.res\", line 93, characters 7-14", 47 === Belt_Set.getUndefined(u22, 47)); - Test_utils.ok("File \"bs_poly_set_test.res\", line 94, characters 7-14", Primitive_object.equal(47, Belt_Set.get(u22, 47))); - Test_utils.ok("File \"bs_poly_set_test.res\", line 95, characters 7-14", Belt_Set.getUndefined(u22, 59) === undefined); - Test_utils.ok("File \"bs_poly_set_test.res\", line 96, characters 7-14", undefined === Belt_Set.get(u22, 59)); - Test_utils.eq("File \"bs_poly_set_test.res\", line 98, characters 7-14", Belt_Set.size(u25), 60); - Test_utils.ok("File \"bs_poly_set_test.res\", line 99, characters 7-14", Belt_Set.minimum(Belt_Set.make(IntCmp)) === undefined); - Test_utils.ok("File \"bs_poly_set_test.res\", line 100, characters 7-14", Belt_Set.maximum(Belt_Set.make(IntCmp)) === undefined); - Test_utils.ok("File \"bs_poly_set_test.res\", line 101, characters 7-14", Belt_Set.minUndefined(Belt_Set.make(IntCmp)) === undefined); - Test_utils.ok("File \"bs_poly_set_test.res\", line 102, characters 7-14", Belt_Set.maxUndefined(Belt_Set.make(IntCmp)) === undefined); + Test_utils.ok("File \"bs_poly_set_test.res\", line 93, characters 7-14", Primitive_object.equal(47, Belt_Set.get(u22, 47))); + Test_utils.ok("File \"bs_poly_set_test.res\", line 94, characters 7-14", undefined === Belt_Set.get(u22, 59)); + Test_utils.eq("File \"bs_poly_set_test.res\", line 96, characters 7-14", Belt_Set.size(u25), 60); + Test_utils.ok("File \"bs_poly_set_test.res\", line 97, characters 7-14", Belt_Set.minimum(Belt_Set.make(IntCmp)) === undefined); + Test_utils.ok("File \"bs_poly_set_test.res\", line 98, characters 7-14", Belt_Set.maximum(Belt_Set.make(IntCmp)) === undefined); }); Mocha.test("set iteration and comparison operations", () => { let u0 = Belt_Set.fromArray(Array_data_util.randomRange(0, 20), IntCmp); let u1 = Belt_Set.remove(u0, 17); let u2 = Belt_Set.add(u1, 33); - Test_utils.ok("File \"bs_poly_set_test.res\", line 109, characters 7-14", Belt_List.every2(testIterToList(u0), Belt_List.makeBy(21, i => i), (x, y) => x === y)); - Test_utils.ok("File \"bs_poly_set_test.res\", line 110, characters 7-14", Belt_List.every2(testIterToList2(u0), Belt_List.makeBy(21, i => i), (x, y) => x === y)); - Test_utils.ok("File \"bs_poly_set_test.res\", line 111, characters 7-14", Belt_List.every2(testIterToList(u0), Belt_Set.toList(u0), (x, y) => x === y)); - Test_utils.ok("File \"bs_poly_set_test.res\", line 112, characters 7-14", Belt_Set.some(u0, x => x === 17)); - Test_utils.ok("File \"bs_poly_set_test.res\", line 113, characters 7-14", !Belt_Set.some(u1, x => x === 17)); - Test_utils.ok("File \"bs_poly_set_test.res\", line 114, characters 7-14", Belt_Set.every(u0, x => x < 24)); - Test_utils.ok("File \"bs_poly_set_test.res\", line 115, characters 7-14", Belt_SetDict.every(Belt_Set.getData(u0), x => x < 24)); - Test_utils.ok("File \"bs_poly_set_test.res\", line 116, characters 7-14", !Belt_Set.every(u2, x => x < 24)); - Test_utils.ok("File \"bs_poly_set_test.res\", line 117, characters 7-14", !Belt_Set.every(Belt_Set.fromArray([ + Test_utils.ok("File \"bs_poly_set_test.res\", line 105, characters 7-14", Belt_List.every2(testIterToList(u0), Belt_List.makeBy(21, i => i), (x, y) => x === y)); + Test_utils.ok("File \"bs_poly_set_test.res\", line 106, characters 7-14", Belt_List.every2(testIterToList2(u0), Belt_List.makeBy(21, i => i), (x, y) => x === y)); + Test_utils.ok("File \"bs_poly_set_test.res\", line 107, characters 7-14", Belt_List.every2(testIterToList(u0), Belt_Set.toList(u0), (x, y) => x === y)); + Test_utils.ok("File \"bs_poly_set_test.res\", line 108, characters 7-14", Belt_Set.some(u0, x => x === 17)); + Test_utils.ok("File \"bs_poly_set_test.res\", line 109, characters 7-14", !Belt_Set.some(u1, x => x === 17)); + Test_utils.ok("File \"bs_poly_set_test.res\", line 110, characters 7-14", Belt_Set.every(u0, x => x < 24)); + Test_utils.ok("File \"bs_poly_set_test.res\", line 111, characters 7-14", Belt_SetDict.every(Belt_Set.getData(u0), x => x < 24)); + Test_utils.ok("File \"bs_poly_set_test.res\", line 112, characters 7-14", !Belt_Set.every(u2, x => x < 24)); + Test_utils.ok("File \"bs_poly_set_test.res\", line 113, characters 7-14", !Belt_Set.every(Belt_Set.fromArray([ 1, 2, 3 ], IntCmp), x => x === 2)); - Test_utils.ok("File \"bs_poly_set_test.res\", line 118, characters 7-14", Belt_Set.cmp(u1, u0) < 0); - Test_utils.ok("File \"bs_poly_set_test.res\", line 119, characters 7-14", Belt_Set.cmp(u0, u1) > 0); + Test_utils.ok("File \"bs_poly_set_test.res\", line 114, characters 7-14", Belt_Set.cmp(u1, u0) < 0); + Test_utils.ok("File \"bs_poly_set_test.res\", line 115, characters 7-14", Belt_Set.cmp(u0, u1) > 0); }); Mocha.test("set keep and partition operations", () => { let a0 = Belt_Set.fromArray(Array_data_util.randomRange(0, 1000), IntCmp); @@ -155,33 +151,33 @@ Mocha.describe("Bs_poly_set_test", () => { let match = Belt_Set.partition(a0, x => x % 2 === 0); let a4 = match[1]; let a3 = match[0]; - Test_utils.ok("File \"bs_poly_set_test.res\", line 126, characters 7-14", Belt_Set.eq(a1, a3)); - Test_utils.ok("File \"bs_poly_set_test.res\", line 127, characters 7-14", Belt_Set.eq(a2, a4)); - Test_utils.eq("File \"bs_poly_set_test.res\", line 128, characters 7-14", Belt_Set.getExn(a0, 3), 3); - Test_utils.eq("File \"bs_poly_set_test.res\", line 129, characters 7-14", Belt_Set.getExn(a0, 4), 4); - Test_utils.throws("File \"bs_poly_set_test.res\", line 130, characters 11-18", () => { + Test_utils.ok("File \"bs_poly_set_test.res\", line 122, characters 7-14", Belt_Set.eq(a1, a3)); + Test_utils.ok("File \"bs_poly_set_test.res\", line 123, characters 7-14", Belt_Set.eq(a2, a4)); + Test_utils.eq("File \"bs_poly_set_test.res\", line 124, characters 7-14", Belt_Set.getExn(a0, 3), 3); + Test_utils.eq("File \"bs_poly_set_test.res\", line 125, characters 7-14", Belt_Set.getExn(a0, 4), 4); + Test_utils.throws("File \"bs_poly_set_test.res\", line 126, characters 11-18", () => { Belt_Set.getExn(a0, 1002); }); - Test_utils.throws("File \"bs_poly_set_test.res\", line 131, characters 11-18", () => { + Test_utils.throws("File \"bs_poly_set_test.res\", line 127, characters 11-18", () => { Belt_Set.getExn(a0, -1); }); - Test_utils.eq("File \"bs_poly_set_test.res\", line 132, characters 7-14", Belt_Set.size(a0), 1001); - Test_utils.ok("File \"bs_poly_set_test.res\", line 133, characters 7-14", !Belt_Set.isEmpty(a0)); + Test_utils.eq("File \"bs_poly_set_test.res\", line 128, characters 7-14", Belt_Set.size(a0), 1001); + Test_utils.ok("File \"bs_poly_set_test.res\", line 129, characters 7-14", !Belt_Set.isEmpty(a0)); let match$1 = Belt_Set.split(a0, 200); let match$2 = match$1[0]; - Test_utils.ok("File \"bs_poly_set_test.res\", line 135, characters 7-14", match$1[1]); - Test_utils.eq("File \"bs_poly_set_test.res\", line 136, characters 7-14", Belt_Set.toArray(match$2[0]), Belt_Array.makeBy(200, i => i)); - Test_utils.eq("File \"bs_poly_set_test.res\", line 137, characters 7-14", Belt_Set.toList(match$2[1]), Belt_List.makeBy(800, i => i + 201 | 0)); + Test_utils.ok("File \"bs_poly_set_test.res\", line 131, characters 7-14", match$1[1]); + Test_utils.eq("File \"bs_poly_set_test.res\", line 132, characters 7-14", Belt_Set.toArray(match$2[0]), Belt_Array.makeBy(200, i => i)); + Test_utils.eq("File \"bs_poly_set_test.res\", line 133, characters 7-14", Belt_Set.toList(match$2[1]), Belt_List.makeBy(800, i => i + 201 | 0)); let a7 = Belt_Set.remove(a0, 200); let match$3 = Belt_Set.split(a7, 200); let match$4 = match$3[0]; let a9 = match$4[1]; let a8 = match$4[0]; - Test_utils.ok("File \"bs_poly_set_test.res\", line 140, characters 7-14", !match$3[1]); - Test_utils.eq("File \"bs_poly_set_test.res\", line 141, characters 7-14", Belt_Set.toArray(a8), Belt_Array.makeBy(200, i => i)); - Test_utils.eq("File \"bs_poly_set_test.res\", line 142, characters 7-14", Belt_Set.toList(a9), Belt_List.makeBy(800, i => i + 201 | 0)); - Test_utils.eq("File \"bs_poly_set_test.res\", line 143, characters 7-14", Belt_Set.minimum(a8), 0); - Test_utils.eq("File \"bs_poly_set_test.res\", line 144, characters 7-14", Belt_Set.minimum(a9), 201); + Test_utils.ok("File \"bs_poly_set_test.res\", line 136, characters 7-14", !match$3[1]); + Test_utils.eq("File \"bs_poly_set_test.res\", line 137, characters 7-14", Belt_Set.toArray(a8), Belt_Array.makeBy(200, i => i)); + Test_utils.eq("File \"bs_poly_set_test.res\", line 138, characters 7-14", Belt_Set.toList(a9), Belt_List.makeBy(800, i => i + 201 | 0)); + Test_utils.eq("File \"bs_poly_set_test.res\", line 139, characters 7-14", Belt_Set.minimum(a8), 0); + Test_utils.eq("File \"bs_poly_set_test.res\", line 140, characters 7-14", Belt_Set.minimum(a9), 201); Belt_List.forEach({ hd: a0, tl: { @@ -201,14 +197,14 @@ Mocha.describe("Bs_poly_set_test", () => { }); Mocha.test("empty set operations", () => { let a = Belt_Set.fromArray([], IntCmp); - Test_utils.ok("File \"bs_poly_set_test.res\", line 150, characters 7-14", Belt_Set.isEmpty(Belt_Set.keep(a, x => x % 2 === 0))); + Test_utils.ok("File \"bs_poly_set_test.res\", line 146, characters 7-14", Belt_Set.isEmpty(Belt_Set.keep(a, x => x % 2 === 0))); }); Mocha.test("split empty set operations", () => { let match = Belt_Set.split(Belt_Set.make(IntCmp), 0); let match$1 = match[0]; - Test_utils.ok("File \"bs_poly_set_test.res\", line 155, characters 7-14", Belt_Set.isEmpty(match$1[0])); - Test_utils.ok("File \"bs_poly_set_test.res\", line 156, characters 7-14", Belt_Set.isEmpty(match$1[1])); - Test_utils.ok("File \"bs_poly_set_test.res\", line 157, characters 7-14", !match[1]); + Test_utils.ok("File \"bs_poly_set_test.res\", line 151, characters 7-14", Belt_Set.isEmpty(match$1[0])); + Test_utils.ok("File \"bs_poly_set_test.res\", line 152, characters 7-14", Belt_Set.isEmpty(match$1[1])); + Test_utils.ok("File \"bs_poly_set_test.res\", line 153, characters 7-14", !match[1]); }); }); diff --git a/tests/tests/src/bs_poly_set_test.res b/tests/tests/src/bs_poly_set_test.res index 91b33735360..af6c7022c63 100644 --- a/tests/tests/src/bs_poly_set_test.res +++ b/tests/tests/src/bs_poly_set_test.res @@ -45,8 +45,8 @@ describe(__MODULE__, () => { ok(__LOC__, u0 !== u1) ok(__LOC__, u2 === u1) eq(__LOC__, N.size(u4), 28) - ok(__LOC__, Js.eqUndefined(29, N.maxUndefined(u4))) - ok(__LOC__, Js.eqUndefined(1, N.minUndefined(u4))) + eq(__LOC__, N.maximum(u4), Some(29)) + eq(__LOC__, N.minimum(u4), Some(1)) ok(__LOC__, u4 === u5) ok(__LOC__, N.isEmpty(u6)) eq(__LOC__, N.size(u7), 3) @@ -90,16 +90,12 @@ describe(__MODULE__, () => { ok(__LOC__, !N.subset(u18, u23)) ok(__LOC__, N.subset(u22, u17)) ok(__LOC__, N.subset(u21, u17) && N.subset(u21, u18)) - ok(__LOC__, Js.eqUndefined(47, N.getUndefined(u22, 47))) ok(__LOC__, Some(47) == N.get(u22, 47)) - ok(__LOC__, N.getUndefined(u22, 59) == Js.undefined) ok(__LOC__, None == N.get(u22, 59)) eq(__LOC__, N.size(u25), 60) ok(__LOC__, N.minimum(N.make(~id=module(IntCmp))) == None) ok(__LOC__, N.maximum(N.make(~id=module(IntCmp))) == None) - ok(__LOC__, N.minUndefined(N.make(~id=module(IntCmp))) == Js.undefined) - ok(__LOC__, N.maxUndefined(N.make(~id=module(IntCmp))) == Js.undefined) }) test("set iteration and comparison operations", () => { diff --git a/tests/tests/src/bs_set_int_test.mjs b/tests/tests/src/bs_set_int_test.mjs index bb87436f781..2bf1b07cc64 100644 --- a/tests/tests/src/bs_set_int_test.mjs +++ b/tests/tests/src/bs_set_int_test.mjs @@ -99,60 +99,59 @@ Mocha.describe("Bs_set_int_test", () => { 33, -1 ]); - let minv = Belt_SetInt.minUndefined(v$1); - let maxv = Belt_SetInt.maxUndefined(v$1); - let approx = (loc, x, y) => Test_utils.ok(loc, x === y); - Test_utils.eq("File \"bs_set_int_test.res\", line 113, characters 7-14", Belt_SetInt.reduce(v$1, 0, (x, y) => x + y | 0), Belt_Array.reduce(ss, 0, (a, b) => a + b | 0)); - approx("File \"bs_set_int_test.res\", line 114, characters 11-18", -1, minv); - approx("File \"bs_set_int_test.res\", line 115, characters 11-18", 222, maxv); + let minv = Belt_SetInt.minimum(v$1); + let maxv = Belt_SetInt.maximum(v$1); + Test_utils.eq("File \"bs_set_int_test.res\", line 112, characters 7-14", Belt_SetInt.reduce(v$1, 0, (x, y) => x + y | 0), Belt_Array.reduce(ss, 0, (a, b) => a + b | 0)); + Test_utils.eq("File \"bs_set_int_test.res\", line 113, characters 7-14", minv, -1); + Test_utils.eq("File \"bs_set_int_test.res\", line 114, characters 7-14", maxv, 222); let v$2 = Belt_SetInt.remove(v$1, 3); let minv$1 = Belt_SetInt.minimum(v$2); let maxv$1 = Belt_SetInt.maximum(v$2); - Test_utils.eq("File \"bs_set_int_test.res\", line 118, characters 7-14", minv$1, -1); - Test_utils.eq("File \"bs_set_int_test.res\", line 119, characters 7-14", maxv$1, 222); + Test_utils.eq("File \"bs_set_int_test.res\", line 117, characters 7-14", minv$1, -1); + Test_utils.eq("File \"bs_set_int_test.res\", line 118, characters 7-14", maxv$1, 222); let v$3 = Belt_SetInt.remove(v$2, 222); let minv$2 = Belt_SetInt.minimum(v$3); let maxv$2 = Belt_SetInt.maximum(v$3); - Test_utils.eq("File \"bs_set_int_test.res\", line 122, characters 7-14", minv$2, -1); - Test_utils.eq("File \"bs_set_int_test.res\", line 123, characters 7-14", maxv$2, 33); + Test_utils.eq("File \"bs_set_int_test.res\", line 121, characters 7-14", minv$2, -1); + Test_utils.eq("File \"bs_set_int_test.res\", line 122, characters 7-14", maxv$2, 33); let v$4 = Belt_SetInt.remove(v$3, -1); let minv$3 = Belt_SetInt.minimum(v$4); let maxv$3 = Belt_SetInt.maximum(v$4); - Test_utils.eq("File \"bs_set_int_test.res\", line 126, characters 7-14", minv$3, 0); - Test_utils.eq("File \"bs_set_int_test.res\", line 127, characters 7-14", maxv$3, 33); + Test_utils.eq("File \"bs_set_int_test.res\", line 125, characters 7-14", minv$3, 0); + Test_utils.eq("File \"bs_set_int_test.res\", line 126, characters 7-14", maxv$3, 33); let v$5 = Belt_SetInt.remove(v$4, 0); let v$6 = Belt_SetInt.remove(v$5, 33); let v$7 = Belt_SetInt.remove(v$6, 2); let v$8 = Belt_SetInt.remove(v$7, 3); let v$9 = Belt_SetInt.remove(v$8, 4); let v$10 = Belt_SetInt.remove(v$9, 1); - Test_utils.ok("File \"bs_set_int_test.res\", line 134, characters 7-14", Belt_SetInt.isEmpty(v$10)); + Test_utils.ok("File \"bs_set_int_test.res\", line 133, characters 7-14", Belt_SetInt.isEmpty(v$10)); let v$11 = Belt_Array.makeByAndShuffle(1000000, i => i); let u$1 = Belt_SetInt.fromArray(v$11); Belt_SetInt.checkInvariantInternal(u$1); let firstHalf = Belt_Array.slice(v$11, 0, 2000); let xx = Belt_Array.reduce(firstHalf, u$1, Belt_SetInt.remove); Belt_SetInt.checkInvariantInternal(u$1); - Test_utils.ok("File \"bs_set_int_test.res\", line 144, characters 6-13", Belt_SetInt.eq(Belt_SetInt.union(Belt_SetInt.fromArray(firstHalf), xx), u$1)); + Test_utils.ok("File \"bs_set_int_test.res\", line 143, characters 6-13", Belt_SetInt.eq(Belt_SetInt.union(Belt_SetInt.fromArray(firstHalf), xx), u$1)); let aa = Belt_SetInt.fromArray(Array_data_util.randomRange(0, 100)); let bb = Belt_SetInt.fromArray(Array_data_util.randomRange(0, 200)); let cc = Belt_SetInt.fromArray(Array_data_util.randomRange(120, 200)); let dd = Belt_SetInt.union(aa, cc); - Test_utils.ok("File \"bs_set_int_test.res\", line 155, characters 7-14", Belt_SetInt.subset(aa, bb)); - Test_utils.ok("File \"bs_set_int_test.res\", line 156, characters 7-14", Belt_SetInt.subset(dd, bb)); - Test_utils.ok("File \"bs_set_int_test.res\", line 157, characters 7-14", Belt_SetInt.subset(Belt_SetInt.add(dd, 200), bb)); - Test_utils.ok("File \"bs_set_int_test.res\", line 158, characters 7-14", Belt_SetInt.add(dd, 200) === dd); - Test_utils.ok("File \"bs_set_int_test.res\", line 159, characters 7-14", Belt_SetInt.add(dd, 0) === dd); - Test_utils.ok("File \"bs_set_int_test.res\", line 160, characters 7-14", !Belt_SetInt.subset(Belt_SetInt.add(dd, 201), bb)); + Test_utils.ok("File \"bs_set_int_test.res\", line 154, characters 7-14", Belt_SetInt.subset(aa, bb)); + Test_utils.ok("File \"bs_set_int_test.res\", line 155, characters 7-14", Belt_SetInt.subset(dd, bb)); + Test_utils.ok("File \"bs_set_int_test.res\", line 156, characters 7-14", Belt_SetInt.subset(Belt_SetInt.add(dd, 200), bb)); + Test_utils.ok("File \"bs_set_int_test.res\", line 157, characters 7-14", Belt_SetInt.add(dd, 200) === dd); + Test_utils.ok("File \"bs_set_int_test.res\", line 158, characters 7-14", Belt_SetInt.add(dd, 0) === dd); + Test_utils.ok("File \"bs_set_int_test.res\", line 159, characters 7-14", !Belt_SetInt.subset(Belt_SetInt.add(dd, 201), bb)); let aa$1 = Belt_SetInt.fromArray(Array_data_util.randomRange(0, 100)); let bb$1 = Belt_SetInt.fromArray(Array_data_util.randomRange(0, 100)); let cc$1 = Belt_SetInt.add(bb$1, 101); let dd$1 = Belt_SetInt.remove(bb$1, 99); let ee = Belt_SetInt.add(dd$1, 101); - Test_utils.ok("File \"bs_set_int_test.res\", line 167, characters 7-14", Belt_SetInt.eq(aa$1, bb$1)); - Test_utils.ok("File \"bs_set_int_test.res\", line 168, characters 7-14", !Belt_SetInt.eq(aa$1, cc$1)); - Test_utils.ok("File \"bs_set_int_test.res\", line 169, characters 7-14", !Belt_SetInt.eq(dd$1, cc$1)); - Test_utils.ok("File \"bs_set_int_test.res\", line 170, characters 7-14", !Belt_SetInt.eq(bb$1, ee)); + Test_utils.ok("File \"bs_set_int_test.res\", line 166, characters 7-14", Belt_SetInt.eq(aa$1, bb$1)); + Test_utils.ok("File \"bs_set_int_test.res\", line 167, characters 7-14", !Belt_SetInt.eq(aa$1, cc$1)); + Test_utils.ok("File \"bs_set_int_test.res\", line 168, characters 7-14", !Belt_SetInt.eq(dd$1, cc$1)); + Test_utils.ok("File \"bs_set_int_test.res\", line 169, characters 7-14", !Belt_SetInt.eq(bb$1, ee)); let a1 = Belt_SetInt.mergeMany(undefined, Array_data_util.randomRange(0, 100)); let a2 = Belt_SetInt.removeMany(a1, Array_data_util.randomRange(40, 100)); let a3 = Belt_SetInt.fromArray(Array_data_util.randomRange(0, 39)); @@ -160,28 +159,28 @@ Mocha.describe("Bs_set_int_test", () => { let match$2 = match$1[0]; let a5 = match$2[1]; let a4 = match$2[0]; - Test_utils.ok("File \"bs_set_int_test.res\", line 177, characters 7-14", Belt_SetInt.eq(a1, Belt_SetInt.fromArray(Array_data_util.randomRange(0, 100)))); - Test_utils.ok("File \"bs_set_int_test.res\", line 178, characters 7-14", Belt_SetInt.eq(a2, a3)); - Test_utils.ok("File \"bs_set_int_test.res\", line 179, characters 7-14", match$1[1]); - Test_utils.ok("File \"bs_set_int_test.res\", line 180, characters 7-14", Belt_SetInt.eq(a3, a4)); + Test_utils.ok("File \"bs_set_int_test.res\", line 176, characters 7-14", Belt_SetInt.eq(a1, Belt_SetInt.fromArray(Array_data_util.randomRange(0, 100)))); + Test_utils.ok("File \"bs_set_int_test.res\", line 177, characters 7-14", Belt_SetInt.eq(a2, a3)); + Test_utils.ok("File \"bs_set_int_test.res\", line 178, characters 7-14", match$1[1]); + Test_utils.ok("File \"bs_set_int_test.res\", line 179, characters 7-14", Belt_SetInt.eq(a3, a4)); let a6 = Belt_SetInt.remove(Belt_SetInt.removeMany(a1, Array_data_util.randomRange(0, 39)), 40); - Test_utils.ok("File \"bs_set_int_test.res\", line 182, characters 7-14", Belt_SetInt.eq(a5, a6)); + Test_utils.ok("File \"bs_set_int_test.res\", line 181, characters 7-14", Belt_SetInt.eq(a5, a6)); let a7 = Belt_SetInt.remove(a1, 40); let match$3 = Belt_SetInt.split(a7, 40); let match$4 = match$3[0]; let a9 = match$4[1]; - Test_utils.ok("File \"bs_set_int_test.res\", line 185, characters 7-14", !match$3[1]); - Test_utils.ok("File \"bs_set_int_test.res\", line 186, characters 7-14", Belt_SetInt.eq(a4, match$4[0])); - Test_utils.ok("File \"bs_set_int_test.res\", line 187, characters 7-14", Belt_SetInt.eq(a5, a9)); + Test_utils.ok("File \"bs_set_int_test.res\", line 184, characters 7-14", !match$3[1]); + Test_utils.ok("File \"bs_set_int_test.res\", line 185, characters 7-14", Belt_SetInt.eq(a4, match$4[0])); + Test_utils.ok("File \"bs_set_int_test.res\", line 186, characters 7-14", Belt_SetInt.eq(a5, a9)); let a10 = Belt_SetInt.removeMany(a9, Array_data_util.randomRange(42, 2000)); - Test_utils.eq("File \"bs_set_int_test.res\", line 189, characters 7-14", Belt_SetInt.size(a10), 1); + Test_utils.eq("File \"bs_set_int_test.res\", line 188, characters 7-14", Belt_SetInt.size(a10), 1); let a11 = Belt_SetInt.removeMany(a9, Array_data_util.randomRange(0, 2000)); - Test_utils.ok("File \"bs_set_int_test.res\", line 191, characters 7-14", Belt_SetInt.isEmpty(a11)); + Test_utils.ok("File \"bs_set_int_test.res\", line 190, characters 7-14", Belt_SetInt.isEmpty(a11)); let match$5 = Belt_SetInt.split(undefined, 0); let match$6 = match$5[0]; - Test_utils.ok("File \"bs_set_int_test.res\", line 194, characters 7-14", Belt_SetInt.isEmpty(match$6[0])); - Test_utils.ok("File \"bs_set_int_test.res\", line 195, characters 7-14", Belt_SetInt.isEmpty(match$6[1])); - Test_utils.ok("File \"bs_set_int_test.res\", line 196, characters 7-14", !match$5[1]); + Test_utils.ok("File \"bs_set_int_test.res\", line 193, characters 7-14", Belt_SetInt.isEmpty(match$6[0])); + Test_utils.ok("File \"bs_set_int_test.res\", line 194, characters 7-14", Belt_SetInt.isEmpty(match$6[1])); + Test_utils.ok("File \"bs_set_int_test.res\", line 195, characters 7-14", !match$5[1]); let v$12 = Belt_SetInt.fromArray(Array_data_util.randomRange(0, 2000)); let v0 = Belt_SetInt.fromArray(Array_data_util.randomRange(0, 2000)); let v1 = Belt_SetInt.fromArray(Array_data_util.randomRange(1, 2001)); @@ -198,15 +197,15 @@ Mocha.describe("Bs_set_int_test", () => { return acc; } }); - Test_utils.eq("File \"bs_set_int_test.res\", line 214, characters 7-14", counted, 1001); - Test_utils.ok("File \"bs_set_int_test.res\", line 215, characters 7-14", Belt_SetInt.eq(v$12, v0)); - Test_utils.ok("File \"bs_set_int_test.res\", line 216, characters 7-14", Belt_SetInt.cmp(v$12, v0) === 0); - Test_utils.ok("File \"bs_set_int_test.res\", line 217, characters 7-14", Belt_SetInt.cmp(v$12, v1) < 0); - Test_utils.ok("File \"bs_set_int_test.res\", line 218, characters 7-14", Belt_SetInt.cmp(v$12, v2) > 0); - Test_utils.ok("File \"bs_set_int_test.res\", line 219, characters 7-14", Belt_SetInt.subset(v3, v0)); - Test_utils.ok("File \"bs_set_int_test.res\", line 220, characters 7-14", !Belt_SetInt.subset(v1, v0)); - Test_utils.eq("File \"bs_set_int_test.res\", line 221, characters 7-14", Belt_SetInt.get(v$12, 30), 30); - Test_utils.eq("File \"bs_set_int_test.res\", line 222, characters 7-14", Belt_SetInt.get(v$12, 3000), undefined); + Test_utils.eq("File \"bs_set_int_test.res\", line 213, characters 7-14", counted, 1001); + Test_utils.ok("File \"bs_set_int_test.res\", line 214, characters 7-14", Belt_SetInt.eq(v$12, v0)); + Test_utils.ok("File \"bs_set_int_test.res\", line 215, characters 7-14", Belt_SetInt.cmp(v$12, v0) === 0); + Test_utils.ok("File \"bs_set_int_test.res\", line 216, characters 7-14", Belt_SetInt.cmp(v$12, v1) < 0); + Test_utils.ok("File \"bs_set_int_test.res\", line 217, characters 7-14", Belt_SetInt.cmp(v$12, v2) > 0); + Test_utils.ok("File \"bs_set_int_test.res\", line 218, characters 7-14", Belt_SetInt.subset(v3, v0)); + Test_utils.ok("File \"bs_set_int_test.res\", line 219, characters 7-14", !Belt_SetInt.subset(v1, v0)); + Test_utils.eq("File \"bs_set_int_test.res\", line 220, characters 7-14", Belt_SetInt.get(v$12, 30), 30); + Test_utils.eq("File \"bs_set_int_test.res\", line 221, characters 7-14", Belt_SetInt.get(v$12, 3000), undefined); }); }); diff --git a/tests/tests/src/bs_set_int_test.res b/tests/tests/src/bs_set_int_test.res index 4503e8752a0..9bfd9e12f33 100644 --- a/tests/tests/src/bs_set_int_test.res +++ b/tests/tests/src/bs_set_int_test.res @@ -108,11 +108,10 @@ describe(__MODULE__, () => { let ss = [1, 222, 3, 4, 2, 0, 33, -1] let v = ofA([1, 222, 3, 4, 2, 0, 33, -1]) - let (minv, maxv) = (N.minUndefined(v), N.maxUndefined(v)) - let approx = (loc, x: int, y) => ok(loc, Js.eqUndefined(x, y)) + let (minv, maxv) = (N.minimum(v), N.maximum(v)) eq(__LOC__, N.reduce(v, 0, (x, y) => x + y), A.reduce(ss, 0, (a, b) => a + b)) - approx(__LOC__, -1, minv) - approx(__LOC__, 222, maxv) + eq(__LOC__, minv, Some(-1)) + eq(__LOC__, maxv, Some(222)) let v = N.remove(v, 3) let (minv, maxv) = (N.minimum(v), N.maximum(v)) eq(__LOC__, minv, Some(-1)) diff --git a/tests/tests/src/bs_stack_test.mjs b/tests/tests/src/bs_stack_test.mjs index e565d4b515b..cfcd9809de1 100644 --- a/tests/tests/src/bs_stack_test.mjs +++ b/tests/tests/src/bs_stack_test.mjs @@ -17,7 +17,7 @@ function inOrder(v) { current = v$1.left; }; while (!Belt_MutableStack.isEmpty(s)) { - current = Belt_MutableStack.popUndefined(s); + current = Belt_MutableStack.popOrThrow(s); let v$2 = current; Belt_MutableQueue.add(q, v$2.value); current = v$2.right; @@ -64,7 +64,7 @@ function inOrder2(v) { } else if (Belt_MutableStack.isEmpty(s)) { todo = false; } else { - cursor = Belt_MutableStack.popUndefined(s); + cursor = Belt_MutableStack.popOrThrow(s); let current = cursor; Belt_MutableQueue.add(q, current.value); cursor = current.right; diff --git a/tests/tests/src/bs_stack_test.res b/tests/tests/src/bs_stack_test.res index fd14dcae46d..2915ce64486 100644 --- a/tests/tests/src/bs_stack_test.res +++ b/tests/tests/src/bs_stack_test.res @@ -21,7 +21,7 @@ let inOrder = (v: t): array => { current := leftGet(v) } while !S.isEmpty(s) { - current := S.popUndefined(s) + current := Js.Undefined.return(S.popOrThrow(s)) let v = Js.Undefined.getUnsafe(current.contents) Q.add(q, valueGet(v)) current := rightGet(v) @@ -66,7 +66,7 @@ let inOrder2 = (v: t) => { S.push(s, v) cursor := leftGet(v) } else if !S.isEmpty(s) { - cursor := S.popUndefined(s) + cursor := Js.Undefined.return(S.popOrThrow(s)) let current = Js.Undefined.getUnsafe(cursor.contents) Q.add(q, valueGet(current)) cursor := rightGet(current)