@fable-org/fable-library-js 2.0.0-beta.4 → 2.0.0-beta.6

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (97) hide show
  1. package/Array.js +56 -52
  2. package/Async.js +8 -7
  3. package/AsyncBuilder.js +6 -6
  4. package/BigInt.js +3 -3
  5. package/Boolean.js +2 -1
  6. package/CHANGELOG.md +14 -0
  7. package/Char.js +64 -31
  8. package/CollectionUtil.js +3 -3
  9. package/Date.js +50 -46
  10. package/DateOffset.js +37 -47
  11. package/DateOnly.js +6 -6
  12. package/Decimal.js +4 -4
  13. package/Double.js +2 -1
  14. package/FSharp.Collections.js +28 -10
  15. package/FSharp.Core.js +23 -23
  16. package/Global.js +21 -0
  17. package/Guid.js +5 -4
  18. package/Int32.js +17 -17
  19. package/List.js +36 -35
  20. package/Long.js +3 -2
  21. package/MailboxProcessor.js +2 -1
  22. package/Map.js +29 -27
  23. package/MapUtil.js +4 -4
  24. package/MutableMap.js +22 -10
  25. package/MutableSet.js +3 -3
  26. package/Option.js +3 -3
  27. package/Random.js +12 -11
  28. package/Range.js +2 -2
  29. package/Reflection.js +16 -16
  30. package/RegExp.js +4 -3
  31. package/Seq.js +31 -29
  32. package/Set.js +34 -33
  33. package/String.js +44 -35
  34. package/System.Collections.Generic.js +20 -4
  35. package/System.Text.js +3 -3
  36. package/System.js +283 -0
  37. package/TimeOnly.js +6 -6
  38. package/TimeSpan.js +5 -5
  39. package/Types.js +1 -17
  40. package/Uri.js +25 -19
  41. package/Util.js +31 -17
  42. package/package.json +1 -1
  43. package/Array.d.ts +0 -123
  44. package/Async.d.ts +0 -26
  45. package/AsyncBuilder.d.ts +0 -59
  46. package/BigInt.d.ts +0 -129
  47. package/BitConverter.d.ts +0 -27
  48. package/Boolean.d.ts +0 -3
  49. package/Char.d.ts +0 -65
  50. package/Choice.d.ts +0 -121
  51. package/CollectionUtil.d.ts +0 -7
  52. package/ConditionalWeakTable.d.ts +0 -9
  53. package/Date.d.ts +0 -69
  54. package/DateOffset.d.ts +0 -64
  55. package/DateOnly.d.ts +0 -18
  56. package/Decimal.d.ts +0 -63
  57. package/Double.d.ts +0 -11
  58. package/Encoding.d.ts +0 -12
  59. package/Event.d.ts +0 -31
  60. package/FSharp.Collections.d.ts +0 -7
  61. package/FSharp.Core.CompilerServices.d.ts +0 -12
  62. package/FSharp.Core.d.ts +0 -30
  63. package/Global.d.ts +0 -24
  64. package/Guid.d.ts +0 -10
  65. package/Int32.d.ts +0 -28
  66. package/List.d.ts +0 -143
  67. package/Long.d.ts +0 -3
  68. package/MailboxProcessor.d.ts +0 -25
  69. package/Map.d.ts +0 -178
  70. package/MapUtil.d.ts +0 -12
  71. package/MutableMap.d.ts +0 -52
  72. package/MutableSet.d.ts +0 -39
  73. package/Native.d.ts +0 -3
  74. package/Numeric.d.ts +0 -20
  75. package/Observable.d.ts +0 -32
  76. package/Option.d.ts +0 -29
  77. package/Random.d.ts +0 -37
  78. package/Range.d.ts +0 -12
  79. package/Reflection.d.ts +0 -119
  80. package/RegExp.d.ts +0 -10
  81. package/Result.d.ts +0 -37
  82. package/Seq.d.ts +0 -164
  83. package/Seq2.d.ts +0 -18
  84. package/Set.d.ts +0 -190
  85. package/String.d.ts +0 -58
  86. package/System.Collections.Generic.d.ts +0 -79
  87. package/System.Text.d.ts +0 -40
  88. package/SystemException.d.ts +0 -5
  89. package/SystemException.js +0 -5
  90. package/TimeOnly.d.ts +0 -15
  91. package/TimeSpan.d.ts +0 -35
  92. package/Timer.d.ts +0 -19
  93. package/Types.d.ts +0 -58
  94. package/Unicode.13.0.0.d.ts +0 -2
  95. package/Uri.d.ts +0 -31
  96. package/Util.d.ts +0 -212
  97. package/lib/big.d.ts +0 -5
package/Seq.js CHANGED
@@ -1,7 +1,9 @@
1
- import { clear, isDisposable, isArrayLike, toIterator, disposeSafe, getEnumerator } from "./Util.js";
1
+ import { InvalidOperationException_$ctor_Z721C83C5, NotSupportedException_$ctor_Z721C83C5 } from "./System.js";
2
+ import { clear, Exception, isDisposable, isArrayLike, toIterator, disposeSafe, getEnumerator } from "./Util.js";
2
3
  import { toString } from "./Types.js";
3
4
  import { class_type } from "./Reflection.js";
4
5
  import { some, value as value_1 } from "./Option.js";
6
+ import { KeyNotFoundException_$ctor_Z721C83C5 } from "./System.Collections.Generic.js";
5
7
  import { Operators_Lock, Operators_NullArgCheck } from "./FSharp.Core.js";
6
8
  import { chunkBySize as chunkBySize_1, permute as permute_1, transpose as transpose_1, map as map_1, windowed as windowed_1, splitInto as splitInto_1, pairwise as pairwise_1, scanBack as scanBack_1, reverse as reverse_1, mapFoldBack as mapFoldBack_1, mapFold as mapFold_1, tryItem as tryItem_1, tryHead as tryHead_1, foldBack2 as foldBack2_1, foldBack as foldBack_1, tryFindIndexBack as tryFindIndexBack_1, tryFindBack as tryFindBack_1, singleton as singleton_1 } from "./Array.js";
7
9
  import { length as length_1, tryItem as tryItem_2, isEmpty as isEmpty_1, tryHead as tryHead_2, ofSeq as ofSeq_1, ofArray as ofArray_1, toArray as toArray_1, FSharpList } from "./List.js";
@@ -14,13 +16,13 @@ export const SR_keyNotFoundAlt = "An index satisfying the predicate was not foun
14
16
  export const SR_notEnoughElements = "The input sequence has an insufficient number of elements.";
15
17
  export const SR_resetNotSupported = "Reset is not supported on this enumerator.";
16
18
  export function Enumerator_noReset() {
17
- throw new Error(SR_resetNotSupported);
19
+ throw NotSupportedException_$ctor_Z721C83C5(SR_resetNotSupported);
18
20
  }
19
21
  export function Enumerator_notStarted() {
20
- throw new Error(SR_enumerationNotStarted);
22
+ throw InvalidOperationException_$ctor_Z721C83C5(SR_enumerationNotStarted);
21
23
  }
22
24
  export function Enumerator_alreadyFinished() {
23
- throw new Error(SR_enumerationAlreadyFinished);
25
+ throw InvalidOperationException_$ctor_Z721C83C5(SR_enumerationAlreadyFinished);
24
26
  }
25
27
  export class Enumerator_Seq {
26
28
  constructor(f) {
@@ -153,7 +155,7 @@ export function Enumerator_concat(sources) {
153
155
  else {
154
156
  let res = undefined;
155
157
  while (res == null) {
156
- let copyOfStruct;
158
+ let copyOfStruct = undefined;
157
159
  const outerOpt_1 = outerOpt;
158
160
  const innerOpt_1 = innerOpt;
159
161
  if (outerOpt_1 != null) {
@@ -294,7 +296,7 @@ export function Enumerator_unfold(f, state) {
294
296
  });
295
297
  }
296
298
  export function indexNotFound() {
297
- throw new Error(SR_keyNotFoundAlt);
299
+ throw KeyNotFoundException_$ctor_Z721C83C5(SR_keyNotFoundAlt);
298
300
  }
299
301
  export function mkSeq(f) {
300
302
  return Enumerator_Seq_$ctor_673A07F2(f);
@@ -501,14 +503,14 @@ export function exactlyOne(xs) {
501
503
  if (e["System.Collections.IEnumerator.MoveNext"]()) {
502
504
  const v = e["System.Collections.Generic.IEnumerator`1.get_Current"]();
503
505
  if (e["System.Collections.IEnumerator.MoveNext"]()) {
504
- throw new Error((SR_inputSequenceTooLong + "\\nParameter name: ") + "source");
506
+ throw new Exception((SR_inputSequenceTooLong + "\\nParameter name: ") + "source");
505
507
  }
506
508
  else {
507
509
  return v;
508
510
  }
509
511
  }
510
512
  else {
511
- throw new Error((SR_inputSequenceEmpty + "\\nParameter name: ") + "source");
513
+ throw new Exception((SR_inputSequenceEmpty + "\\nParameter name: ") + "source");
512
514
  }
513
515
  }
514
516
  finally {
@@ -681,7 +683,7 @@ export function tryHead(xs) {
681
683
  export function head(xs) {
682
684
  const matchValue = tryHead(xs);
683
685
  if (matchValue == null) {
684
- throw new Error((SR_inputSequenceEmpty + "\\nParameter name: ") + "source");
686
+ throw new Exception((SR_inputSequenceEmpty + "\\nParameter name: ") + "source");
685
687
  }
686
688
  else {
687
689
  return value_1(matchValue);
@@ -747,7 +749,7 @@ export function tryItem(index, xs) {
747
749
  export function item(index, xs) {
748
750
  const matchValue = tryItem(index, xs);
749
751
  if (matchValue == null) {
750
- throw new Error((SR_notEnoughElements + "\\nParameter name: ") + "index");
752
+ throw new Exception((SR_notEnoughElements + "\\nParameter name: ") + "index");
751
753
  }
752
754
  else {
753
755
  return value_1(matchValue);
@@ -800,7 +802,7 @@ export function tryLast(xs) {
800
802
  export function last(xs) {
801
803
  const matchValue = tryLast(xs);
802
804
  if (matchValue == null) {
803
- throw new Error((SR_notEnoughElements + "\\nParameter name: ") + "source");
805
+ throw new Exception((SR_notEnoughElements + "\\nParameter name: ") + "source");
804
806
  }
805
807
  else {
806
808
  return value_1(matchValue);
@@ -929,7 +931,7 @@ export function cache(source) {
929
931
  return CachedSeq$1_$ctor_Z7A8347D4(() => {
930
932
  Operators_Lock(prefix, () => {
931
933
  clear(prefix);
932
- let matchResult, e;
934
+ let matchResult = undefined, e = undefined;
933
935
  if (enumeratorR != null) {
934
936
  if (value_1(enumeratorR) != null) {
935
937
  matchResult = 0;
@@ -1041,7 +1043,7 @@ export function reduce(folder, xs) {
1041
1043
  return loop(e["System.Collections.Generic.IEnumerator`1.get_Current"]());
1042
1044
  }
1043
1045
  else {
1044
- throw new Error(SR_inputSequenceEmpty);
1046
+ throw new Exception(SR_inputSequenceEmpty);
1045
1047
  }
1046
1048
  }
1047
1049
  finally {
@@ -1054,7 +1056,7 @@ export function reduceBack(folder, xs) {
1054
1056
  return arr.reduceRight(folder);
1055
1057
  }
1056
1058
  else {
1057
- throw new Error(SR_inputSequenceEmpty);
1059
+ throw new Exception(SR_inputSequenceEmpty);
1058
1060
  }
1059
1061
  }
1060
1062
  export function replicate(n, x) {
@@ -1081,7 +1083,7 @@ export function skip(count, source) {
1081
1083
  try {
1082
1084
  for (let _ = 1; _ <= count; _++) {
1083
1085
  if (!e["System.Collections.IEnumerator.MoveNext"]()) {
1084
- throw new Error((SR_notEnoughElements + "\\nParameter name: ") + "source");
1086
+ throw new Exception((SR_notEnoughElements + "\\nParameter name: ") + "source");
1085
1087
  }
1086
1088
  }
1087
1089
  return Enumerator_enumerateThenFinally(() => {
@@ -1114,7 +1116,7 @@ export function take(count, xs) {
1114
1116
  return some(e["System.Collections.Generic.IEnumerator`1.get_Current"]());
1115
1117
  }
1116
1118
  else {
1117
- throw new Error((SR_notEnoughElements + "\\nParameter name: ") + "source");
1119
+ throw new Exception((SR_notEnoughElements + "\\nParameter name: ") + "source");
1118
1120
  }
1119
1121
  }
1120
1122
  else {
@@ -1202,7 +1204,7 @@ export function average(xs, averager) {
1202
1204
  return averager.Add(acc, x);
1203
1205
  }, averager.GetZero(), xs);
1204
1206
  if (count === 0) {
1205
- throw new Error((SR_inputSequenceEmpty + "\\nParameter name: ") + "source");
1207
+ throw new Exception((SR_inputSequenceEmpty + "\\nParameter name: ") + "source");
1206
1208
  }
1207
1209
  else {
1208
1210
  return averager.DivideByInt(total, count);
@@ -1215,7 +1217,7 @@ export function averageBy(f, xs, averager) {
1215
1217
  return averager.Add(acc, f(x));
1216
1218
  }, averager.GetZero(), xs);
1217
1219
  if (count === 0) {
1218
- throw new Error((SR_inputSequenceEmpty + "\\nParameter name: ") + "source");
1220
+ throw new Exception((SR_inputSequenceEmpty + "\\nParameter name: ") + "source");
1219
1221
  }
1220
1222
  else {
1221
1223
  return averager.DivideByInt(total, count);
@@ -1230,7 +1232,7 @@ export function chunkBySize(chunkSize, xs) {
1230
1232
  export function insertAt(index, y, xs) {
1231
1233
  let isDone = false;
1232
1234
  if (index < 0) {
1233
- throw new Error((SR_indexOutOfBounds + "\\nParameter name: ") + "index");
1235
+ throw new Exception((SR_indexOutOfBounds + "\\nParameter name: ") + "index");
1234
1236
  }
1235
1237
  return generateIndexed(() => ofSeq(xs), (i, e) => {
1236
1238
  if ((isDone ? true : (i < index)) && e["System.Collections.IEnumerator.MoveNext"]()) {
@@ -1242,7 +1244,7 @@ export function insertAt(index, y, xs) {
1242
1244
  }
1243
1245
  else {
1244
1246
  if (!isDone) {
1245
- throw new Error((SR_indexOutOfBounds + "\\nParameter name: ") + "index");
1247
+ throw new Exception((SR_indexOutOfBounds + "\\nParameter name: ") + "index");
1246
1248
  }
1247
1249
  return undefined;
1248
1250
  }
@@ -1253,7 +1255,7 @@ export function insertAt(index, y, xs) {
1253
1255
  export function insertManyAt(index, ys, xs) {
1254
1256
  let status = -1;
1255
1257
  if (index < 0) {
1256
- throw new Error((SR_indexOutOfBounds + "\\nParameter name: ") + "index");
1258
+ throw new Exception((SR_indexOutOfBounds + "\\nParameter name: ") + "index");
1257
1259
  }
1258
1260
  return generateIndexed(() => [ofSeq(xs), ofSeq(ys)], (i, tupledArg) => {
1259
1261
  const e1 = tupledArg[0];
@@ -1280,7 +1282,7 @@ export function insertManyAt(index, ys, xs) {
1280
1282
  }
1281
1283
  else {
1282
1284
  if (status < 1) {
1283
- throw new Error((SR_indexOutOfBounds + "\\nParameter name: ") + "index");
1285
+ throw new Exception((SR_indexOutOfBounds + "\\nParameter name: ") + "index");
1284
1286
  }
1285
1287
  return undefined;
1286
1288
  }
@@ -1296,7 +1298,7 @@ export function insertManyAt(index, ys, xs) {
1296
1298
  export function removeAt(index, xs) {
1297
1299
  let isDone = false;
1298
1300
  if (index < 0) {
1299
- throw new Error((SR_indexOutOfBounds + "\\nParameter name: ") + "index");
1301
+ throw new Exception((SR_indexOutOfBounds + "\\nParameter name: ") + "index");
1300
1302
  }
1301
1303
  return generateIndexed(() => ofSeq(xs), (i, e) => {
1302
1304
  if ((isDone ? true : (i < index)) && e["System.Collections.IEnumerator.MoveNext"]()) {
@@ -1308,7 +1310,7 @@ export function removeAt(index, xs) {
1308
1310
  }
1309
1311
  else {
1310
1312
  if (!isDone) {
1311
- throw new Error((SR_indexOutOfBounds + "\\nParameter name: ") + "index");
1313
+ throw new Exception((SR_indexOutOfBounds + "\\nParameter name: ") + "index");
1312
1314
  }
1313
1315
  return undefined;
1314
1316
  }
@@ -1318,7 +1320,7 @@ export function removeAt(index, xs) {
1318
1320
  }
1319
1321
  export function removeManyAt(index, count, xs) {
1320
1322
  if (index < 0) {
1321
- throw new Error((SR_indexOutOfBounds + "\\nParameter name: ") + "index");
1323
+ throw new Exception((SR_indexOutOfBounds + "\\nParameter name: ") + "index");
1322
1324
  }
1323
1325
  return generateIndexed(() => ofSeq(xs), (i, e) => {
1324
1326
  if (i < index) {
@@ -1326,14 +1328,14 @@ export function removeManyAt(index, count, xs) {
1326
1328
  return some(e["System.Collections.Generic.IEnumerator`1.get_Current"]());
1327
1329
  }
1328
1330
  else {
1329
- throw new Error((SR_indexOutOfBounds + "\\nParameter name: ") + "index");
1331
+ throw new Exception((SR_indexOutOfBounds + "\\nParameter name: ") + "index");
1330
1332
  }
1331
1333
  }
1332
1334
  else {
1333
1335
  if (i === index) {
1334
1336
  for (let _ = 1; _ <= count; _++) {
1335
1337
  if (!e["System.Collections.IEnumerator.MoveNext"]()) {
1336
- throw new Error((SR_indexOutOfBounds + "\\nParameter name: ") + "count");
1338
+ throw new Exception((SR_indexOutOfBounds + "\\nParameter name: ") + "count");
1337
1339
  }
1338
1340
  }
1339
1341
  }
@@ -1346,7 +1348,7 @@ export function removeManyAt(index, count, xs) {
1346
1348
  export function updateAt(index, y, xs) {
1347
1349
  let isDone = false;
1348
1350
  if (index < 0) {
1349
- throw new Error((SR_indexOutOfBounds + "\\nParameter name: ") + "index");
1351
+ throw new Exception((SR_indexOutOfBounds + "\\nParameter name: ") + "index");
1350
1352
  }
1351
1353
  return generateIndexed(() => ofSeq(xs), (i, e) => {
1352
1354
  if ((isDone ? true : (i < index)) && e["System.Collections.IEnumerator.MoveNext"]()) {
@@ -1358,7 +1360,7 @@ export function updateAt(index, y, xs) {
1358
1360
  }
1359
1361
  else {
1360
1362
  if (!isDone) {
1361
- throw new Error((SR_indexOutOfBounds + "\\nParameter name: ") + "index");
1363
+ throw new Exception((SR_indexOutOfBounds + "\\nParameter name: ") + "index");
1362
1364
  }
1363
1365
  return undefined;
1364
1366
  }
package/Set.js CHANGED
@@ -1,10 +1,11 @@
1
1
  import { record_type, bool_type, list_type, option_type, class_type } from "./Reflection.js";
2
2
  import { some, value as value_3 } from "./Option.js";
3
- import { structuralHash, toIterator, disposeSafe, getEnumerator, isArrayLike } from "./Util.js";
3
+ import { structuralHash, toIterator, disposeSafe, getEnumerator, isArrayLike, Exception } from "./Util.js";
4
4
  import { Record } from "./Types.js";
5
5
  import { fold as fold_2, cons, singleton as singleton_1, empty as empty_1, ofArrayWithTail, tail, head, isEmpty as isEmpty_1, FSharpList } from "./List.js";
6
6
  import { fold as fold_1, fill, setItem } from "./Array.js";
7
7
  import { join } from "./String.js";
8
+ import { NotSupportedException_$ctor_Z721C83C5 } from "./System.js";
8
9
  import { exists as exists_1, cache, forAll as forAll_1, fold as fold_3, reduce, iterate as iterate_1, map as map_1 } from "./Seq.js";
9
10
  import { HashSet__get_Comparer, HashSet_$ctor_Z6150332D, HashSet } from "./MutableSet.js";
10
11
  export class SetTreeLeaf$1 {
@@ -72,7 +73,7 @@ export function SetTreeModule_count(s) {
72
73
  return SetTreeModule_countAux(s, 0) | 0;
73
74
  }
74
75
  export function SetTreeModule_mk(l, k, r) {
75
- let tn, tn_1;
76
+ let tn = undefined, tn_1 = undefined;
76
77
  let hl;
77
78
  const t = l;
78
79
  if (t != null) {
@@ -100,7 +101,7 @@ export function SetTreeModule_mk(l, k, r) {
100
101
  }
101
102
  }
102
103
  export function SetTreeModule_rebalance(t1, v, t2) {
103
- let tn, tn_1, t_2, t2_3, tn_2, t_3, t2_4, tn_3;
104
+ let tn = undefined, tn_1 = undefined, t_2 = undefined, t2_3 = undefined, tn_2 = undefined, t_3 = undefined, t2_4 = undefined, tn_3 = undefined;
104
105
  let t1h;
105
106
  const t = t1;
106
107
  if (t != null) {
@@ -130,7 +131,7 @@ export function SetTreeModule_rebalance(t1, v, t2) {
130
131
  return SetTreeModule_mk(SetTreeModule_mk(t1, v, SetTreeNode$1__get_Left(t2l)), SetTreeLeaf$1__get_Key(t2l), SetTreeModule_mk(SetTreeNode$1__get_Right(t2l), SetTreeLeaf$1__get_Key(t2$0027), SetTreeNode$1__get_Right(t2$0027)));
131
132
  }
132
133
  else {
133
- throw new Error("internal error: Set.rebalance");
134
+ throw new Exception("internal error: Set.rebalance");
134
135
  }
135
136
  }
136
137
  else {
@@ -138,7 +139,7 @@ export function SetTreeModule_rebalance(t1, v, t2) {
138
139
  }
139
140
  }
140
141
  else {
141
- throw new Error("internal error: Set.rebalance");
142
+ throw new Exception("internal error: Set.rebalance");
142
143
  }
143
144
  }
144
145
  else if (t1h > (t2h + 2)) {
@@ -152,7 +153,7 @@ export function SetTreeModule_rebalance(t1, v, t2) {
152
153
  return SetTreeModule_mk(SetTreeModule_mk(SetTreeNode$1__get_Left(t1$0027), SetTreeLeaf$1__get_Key(t1$0027), SetTreeNode$1__get_Left(t1r)), SetTreeLeaf$1__get_Key(t1r), SetTreeModule_mk(SetTreeNode$1__get_Right(t1r), v, t2));
153
154
  }
154
155
  else {
155
- throw new Error("internal error: Set.rebalance");
156
+ throw new Exception("internal error: Set.rebalance");
156
157
  }
157
158
  }
158
159
  else {
@@ -160,7 +161,7 @@ export function SetTreeModule_rebalance(t1, v, t2) {
160
161
  }
161
162
  }
162
163
  else {
163
- throw new Error("internal error: Set.rebalance");
164
+ throw new Exception("internal error: Set.rebalance");
164
165
  }
165
166
  }
166
167
  else {
@@ -288,7 +289,7 @@ export function SetTreeModule_spliceOutSuccessor(t) {
288
289
  }
289
290
  }
290
291
  else {
291
- throw new Error("internal error: Set.spliceOutSuccessor");
292
+ throw new Exception("internal error: Set.spliceOutSuccessor");
292
293
  }
293
294
  }
294
295
  export function SetTreeModule_remove(comparer, k, t) {
@@ -730,7 +731,7 @@ export function SetTreeModule_maximumElementOpt(t) {
730
731
  export function SetTreeModule_minimumElement(s) {
731
732
  const matchValue = SetTreeModule_minimumElementOpt(s);
732
733
  if (matchValue == null) {
733
- throw new Error("Set contains no elements");
734
+ throw new Exception("Set contains no elements");
734
735
  }
735
736
  else {
736
737
  return value_3(matchValue);
@@ -739,7 +740,7 @@ export function SetTreeModule_minimumElement(s) {
739
740
  export function SetTreeModule_maximumElement(s) {
740
741
  const matchValue = SetTreeModule_maximumElementOpt(s);
741
742
  if (matchValue == null) {
742
- throw new Error("Set contains no elements");
743
+ throw new Exception("Set contains no elements");
743
744
  }
744
745
  else {
745
746
  return value_3(matchValue);
@@ -787,10 +788,10 @@ export function SetTreeModule_mkIterator(s) {
787
788
  return new SetTreeModule_SetIterator$1(SetTreeModule_collapseLHS(singleton_1(s)), false);
788
789
  }
789
790
  export function SetTreeModule_notStarted() {
790
- throw new Error("Enumeration not started");
791
+ throw new Exception("Enumeration not started");
791
792
  }
792
793
  export function SetTreeModule_alreadyFinished() {
793
- throw new Error("Enumeration already started");
794
+ throw new Exception("Enumeration already started");
794
795
  }
795
796
  export function SetTreeModule_current(i) {
796
797
  if (i.started) {
@@ -803,7 +804,7 @@ export function SetTreeModule_current(i) {
803
804
  return SetTreeLeaf$1__get_Key(t);
804
805
  }
805
806
  else {
806
- throw new Error("Please report error: Set iterator, unexpected stack for current");
807
+ throw new Exception("Please report error: Set iterator, unexpected stack for current");
807
808
  }
808
809
  }
809
810
  else {
@@ -817,7 +818,7 @@ export function SetTreeModule_moveNext(i) {
817
818
  if (head(matchValue) != null) {
818
819
  const t = value_3(head(matchValue));
819
820
  if (t instanceof SetTreeNode$1) {
820
- throw new Error("Please report error: Set iterator, unexpected stack for moveNext");
821
+ throw new Exception("Please report error: Set iterator, unexpected stack for moveNext");
821
822
  }
822
823
  else {
823
824
  i.stack = SetTreeModule_collapseLHS(tail(matchValue));
@@ -825,7 +826,7 @@ export function SetTreeModule_moveNext(i) {
825
826
  }
826
827
  }
827
828
  else {
828
- throw new Error("Please report error: Set iterator, unexpected stack for moveNext");
829
+ throw new Exception("Please report error: Set iterator, unexpected stack for moveNext");
829
830
  }
830
831
  }
831
832
  else {
@@ -886,7 +887,7 @@ export function SetTreeModule_compareStacks(comparer_mut, l1_mut, l2_mut) {
886
887
  }
887
888
  }
888
889
  else {
889
- let matchResult, t1_6, x1_4, t2_6, x2_4;
890
+ let matchResult = undefined, t1_6 = undefined, x1_4 = undefined, t2_6 = undefined, x2_4 = undefined;
890
891
  if (!isEmpty_1(l1)) {
891
892
  if (head(l1) != null) {
892
893
  matchResult = 0;
@@ -950,7 +951,7 @@ export function SetTreeModule_compareStacks(comparer_mut, l1_mut, l2_mut) {
950
951
  continue SetTreeModule_compareStacks;
951
952
  }
952
953
  default:
953
- throw new Error("unexpected state in SetTree.compareStacks");
954
+ throw new Exception("unexpected state in SetTree.compareStacks");
954
955
  }
955
956
  }
956
957
  }
@@ -968,7 +969,7 @@ export function SetTreeModule_compareStacks(comparer_mut, l1_mut, l2_mut) {
968
969
  }
969
970
  }
970
971
  else {
971
- let matchResult_1, t1_7, x1_5, t2_7, x2_5;
972
+ let matchResult_1 = undefined, t1_7 = undefined, x1_5 = undefined, t2_7 = undefined, x2_5 = undefined;
972
973
  if (!isEmpty_1(l1)) {
973
974
  if (head(l1) != null) {
974
975
  matchResult_1 = 0;
@@ -1032,7 +1033,7 @@ export function SetTreeModule_compareStacks(comparer_mut, l1_mut, l2_mut) {
1032
1033
  continue SetTreeModule_compareStacks;
1033
1034
  }
1034
1035
  default:
1035
- throw new Error("unexpected state in SetTree.compareStacks");
1036
+ throw new Exception("unexpected state in SetTree.compareStacks");
1036
1037
  }
1037
1038
  }
1038
1039
  }
@@ -1051,7 +1052,7 @@ export function SetTreeModule_compareStacks(comparer_mut, l1_mut, l2_mut) {
1051
1052
  }
1052
1053
  }
1053
1054
  else {
1054
- let matchResult_2, t1_8, x1_6, t2_8, x2_6;
1055
+ let matchResult_2 = undefined, t1_8 = undefined, x1_6 = undefined, t2_8 = undefined, x2_6 = undefined;
1055
1056
  if (!isEmpty_1(l1)) {
1056
1057
  if (head(l1) != null) {
1057
1058
  matchResult_2 = 0;
@@ -1115,7 +1116,7 @@ export function SetTreeModule_compareStacks(comparer_mut, l1_mut, l2_mut) {
1115
1116
  continue SetTreeModule_compareStacks;
1116
1117
  }
1117
1118
  default:
1118
- throw new Error("unexpected state in SetTree.compareStacks");
1119
+ throw new Exception("unexpected state in SetTree.compareStacks");
1119
1120
  }
1120
1121
  }
1121
1122
  }
@@ -1134,7 +1135,7 @@ export function SetTreeModule_compareStacks(comparer_mut, l1_mut, l2_mut) {
1134
1135
  }
1135
1136
  else {
1136
1137
  const x2 = value_3(head(l2));
1137
- let matchResult_3, t1_2, x1, t2_2, x2_1;
1138
+ let matchResult_3 = undefined, t1_2 = undefined, x1 = undefined, t2_2 = undefined, x2_1 = undefined;
1138
1139
  if (!isEmpty_1(l1)) {
1139
1140
  if (head(l1) != null) {
1140
1141
  matchResult_3 = 0;
@@ -1198,13 +1199,13 @@ export function SetTreeModule_compareStacks(comparer_mut, l1_mut, l2_mut) {
1198
1199
  continue SetTreeModule_compareStacks;
1199
1200
  }
1200
1201
  default:
1201
- throw new Error("unexpected state in SetTree.compareStacks");
1202
+ throw new Exception("unexpected state in SetTree.compareStacks");
1202
1203
  }
1203
1204
  }
1204
1205
  }
1205
1206
  else if (head(l1) != null) {
1206
1207
  const x1_1 = value_3(head(l1));
1207
- let matchResult_4, t1_4, x1_2, t2_4, x2_2;
1208
+ let matchResult_4 = undefined, t1_4 = undefined, x1_2 = undefined, t2_4 = undefined, x2_2 = undefined;
1208
1209
  if (!isEmpty_1(l1)) {
1209
1210
  if (head(l1) != null) {
1210
1211
  matchResult_4 = 0;
@@ -1268,7 +1269,7 @@ export function SetTreeModule_compareStacks(comparer_mut, l1_mut, l2_mut) {
1268
1269
  continue SetTreeModule_compareStacks;
1269
1270
  }
1270
1271
  default:
1271
- throw new Error("unexpected state in SetTree.compareStacks");
1272
+ throw new Exception("unexpected state in SetTree.compareStacks");
1272
1273
  }
1273
1274
  }
1274
1275
  else {
@@ -1395,7 +1396,7 @@ export class FSharpSet {
1395
1396
  return FSharpSet__ComputeHashCode(this$) | 0;
1396
1397
  }
1397
1398
  Equals(other) {
1398
- let that;
1399
+ let that = undefined;
1399
1400
  const this$ = this;
1400
1401
  return (other instanceof FSharpSet) && ((that = other, SetTreeModule_compare(FSharpSet__get_Comparer(this$), FSharpSet__get_Tree(this$), FSharpSet__get_Tree(that)) === 0));
1401
1402
  }
@@ -1411,18 +1412,18 @@ export class FSharpSet {
1411
1412
  return Array.from(this$);
1412
1413
  }
1413
1414
  CompareTo(other) {
1414
- let that;
1415
+ let that = undefined;
1415
1416
  const this$ = this;
1416
1417
  return ((other instanceof FSharpSet) ? ((that = other, SetTreeModule_compare(FSharpSet__get_Comparer(this$), FSharpSet__get_Tree(this$), FSharpSet__get_Tree(that)))) : 1) | 0;
1417
1418
  }
1418
1419
  "System.Collections.Generic.ICollection`1.Add2B595"(x) {
1419
- throw new Error("ReadOnlyCollection");
1420
+ throw NotSupportedException_$ctor_Z721C83C5("ReadOnlyCollection");
1420
1421
  }
1421
1422
  "System.Collections.Generic.ICollection`1.Clear"() {
1422
- throw new Error("ReadOnlyCollection");
1423
+ throw NotSupportedException_$ctor_Z721C83C5("ReadOnlyCollection");
1423
1424
  }
1424
1425
  "System.Collections.Generic.ICollection`1.Remove2B595"(x) {
1425
- throw new Error("ReadOnlyCollection");
1426
+ throw NotSupportedException_$ctor_Z721C83C5("ReadOnlyCollection");
1426
1427
  }
1427
1428
  "System.Collections.Generic.ICollection`1.Contains2B595"(x) {
1428
1429
  const s = this;
@@ -1460,14 +1461,14 @@ export class FSharpSet {
1460
1461
  }
1461
1462
  add(k) {
1462
1463
  const s = this;
1463
- throw new Error("Set cannot be mutated");
1464
+ throw new Exception("Set cannot be mutated");
1464
1465
  return s;
1465
1466
  }
1466
1467
  clear() {
1467
- throw new Error("Set cannot be mutated");
1468
+ throw new Exception("Set cannot be mutated");
1468
1469
  }
1469
1470
  delete(k) {
1470
- throw new Error("Set cannot be mutated");
1471
+ throw new Exception("Set cannot be mutated");
1471
1472
  return false;
1472
1473
  }
1473
1474
  has(k) {