fable-library 5.3.0__tar.gz → 5.4.0__tar.gz

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 (92) hide show
  1. {fable_library-5.3.0 → fable_library-5.4.0}/PKG-INFO +2 -2
  2. fable_library-5.4.0/fable_library/_version.py +1 -0
  3. {fable_library-5.3.0 → fable_library-5.4.0}/fable_library/fsharp_core.py +2 -1
  4. {fable_library-5.3.0 → fable_library-5.4.0}/fable_library/list.py +18 -17
  5. {fable_library-5.3.0 → fable_library-5.4.0}/fable_library/map.py +5 -4
  6. {fable_library-5.3.0 → fable_library-5.4.0}/fable_library/mutable_map.py +2 -1
  7. {fable_library-5.3.0 → fable_library-5.4.0}/fable_library/mutable_set.py +2 -2
  8. {fable_library-5.3.0 → fable_library-5.4.0}/fable_library/range.py +12 -12
  9. {fable_library-5.3.0 → fable_library-5.4.0}/fable_library/result.py +2 -2
  10. {fable_library-5.3.0 → fable_library-5.4.0}/fable_library/seq.py +2 -1
  11. {fable_library-5.3.0 → fable_library-5.4.0}/fable_library/seq2.py +20 -20
  12. {fable_library-5.3.0 → fable_library-5.4.0}/fable_library/set.py +8 -8
  13. {fable_library-5.3.0 → fable_library-5.4.0}/fable_library/system.py +77 -63
  14. {fable_library-5.3.0 → fable_library-5.4.0}/fable_library/system_collections_generic.py +2 -1
  15. {fable_library-5.3.0 → fable_library-5.4.0}/fable_library/types.py +17 -0
  16. {fable_library-5.3.0 → fable_library-5.4.0}/pyproject.toml +2 -2
  17. {fable_library-5.3.0 → fable_library-5.4.0}/src/array.rs +24 -54
  18. {fable_library-5.3.0 → fable_library-5.4.0}/uv.lock +1 -1
  19. fable_library-5.3.0/fable_library/_version.py +0 -1
  20. {fable_library-5.3.0 → fable_library-5.4.0}/Cargo.lock +0 -0
  21. {fable_library-5.3.0 → fable_library-5.4.0}/Cargo.toml +0 -0
  22. {fable_library-5.3.0 → fable_library-5.4.0}/README.md +0 -0
  23. {fable_library-5.3.0 → fable_library-5.4.0}/fable_library/__init__.py +0 -0
  24. {fable_library-5.3.0 → fable_library-5.4.0}/fable_library/array_.py +0 -0
  25. {fable_library-5.3.0 → fable_library-5.4.0}/fable_library/async_.py +0 -0
  26. {fable_library-5.3.0 → fable_library-5.4.0}/fable_library/async_builder.py +0 -0
  27. {fable_library-5.3.0 → fable_library-5.4.0}/fable_library/bases.py +0 -0
  28. {fable_library-5.3.0 → fable_library-5.4.0}/fable_library/big_int.py +0 -0
  29. {fable_library-5.3.0 → fable_library-5.4.0}/fable_library/bit_converter.py +0 -0
  30. {fable_library-5.3.0 → fable_library-5.4.0}/fable_library/boolean.py +0 -0
  31. {fable_library-5.3.0 → fable_library-5.4.0}/fable_library/char.py +0 -0
  32. {fable_library-5.3.0 → fable_library-5.4.0}/fable_library/choice.py +0 -0
  33. {fable_library-5.3.0 → fable_library-5.4.0}/fable_library/core/__init__.py +0 -0
  34. {fable_library-5.3.0 → fable_library-5.4.0}/fable_library/core/__init__.pyi +0 -0
  35. {fable_library-5.3.0 → fable_library-5.4.0}/fable_library/core/_core.pyi +0 -0
  36. {fable_library-5.3.0 → fable_library-5.4.0}/fable_library/core/array.pyi +0 -0
  37. {fable_library-5.3.0 → fable_library-5.4.0}/fable_library/core/floats.pyi +0 -0
  38. {fable_library-5.3.0 → fable_library-5.4.0}/fable_library/core/ints.pyi +0 -0
  39. {fable_library-5.3.0 → fable_library-5.4.0}/fable_library/core/option.pyi +0 -0
  40. {fable_library-5.3.0 → fable_library-5.4.0}/fable_library/core/strings.pyi +0 -0
  41. {fable_library-5.3.0 → fable_library-5.4.0}/fable_library/core/types.pyi +0 -0
  42. {fable_library-5.3.0 → fable_library-5.4.0}/fable_library/curry.py +0 -0
  43. {fable_library-5.3.0 → fable_library-5.4.0}/fable_library/date.py +0 -0
  44. {fable_library-5.3.0 → fable_library-5.4.0}/fable_library/date_offset.py +0 -0
  45. {fable_library-5.3.0 → fable_library-5.4.0}/fable_library/date_only.py +0 -0
  46. {fable_library-5.3.0 → fable_library-5.4.0}/fable_library/decimal_.py +0 -0
  47. {fable_library-5.3.0 → fable_library-5.4.0}/fable_library/diagnostics.py +0 -0
  48. {fable_library-5.3.0 → fable_library-5.4.0}/fable_library/double.py +0 -0
  49. {fable_library-5.3.0 → fable_library-5.4.0}/fable_library/encoding.py +0 -0
  50. {fable_library-5.3.0 → fable_library-5.4.0}/fable_library/event.py +0 -0
  51. {fable_library-5.3.0 → fable_library-5.4.0}/fable_library/exceptions.py +0 -0
  52. {fable_library-5.3.0 → fable_library-5.4.0}/fable_library/file.py +0 -0
  53. {fable_library-5.3.0 → fable_library-5.4.0}/fable_library/floats.py +0 -0
  54. {fable_library-5.3.0 → fable_library-5.4.0}/fable_library/fsharp_collections.py +0 -0
  55. {fable_library-5.3.0 → fable_library-5.4.0}/fable_library/global_.py +0 -0
  56. {fable_library-5.3.0 → fable_library-5.4.0}/fable_library/guid.py +0 -0
  57. {fable_library-5.3.0 → fable_library-5.4.0}/fable_library/int32.py +0 -0
  58. {fable_library-5.3.0 → fable_library-5.4.0}/fable_library/long.py +0 -0
  59. {fable_library-5.3.0 → fable_library-5.4.0}/fable_library/mailbox_processor.py +0 -0
  60. {fable_library-5.3.0 → fable_library-5.4.0}/fable_library/map_util.py +0 -0
  61. {fable_library-5.3.0 → fable_library-5.4.0}/fable_library/native.py +0 -0
  62. {fable_library-5.3.0 → fable_library-5.4.0}/fable_library/numeric.py +0 -0
  63. {fable_library-5.3.0 → fable_library-5.4.0}/fable_library/observable.py +0 -0
  64. {fable_library-5.3.0 → fable_library-5.4.0}/fable_library/option.py +0 -0
  65. {fable_library-5.3.0 → fable_library-5.4.0}/fable_library/path.py +0 -0
  66. {fable_library-5.3.0 → fable_library-5.4.0}/fable_library/protocols.py +0 -0
  67. {fable_library-5.3.0 → fable_library-5.4.0}/fable_library/quotation.py +0 -0
  68. {fable_library-5.3.0 → fable_library-5.4.0}/fable_library/record.py +0 -0
  69. {fable_library-5.3.0 → fable_library-5.4.0}/fable_library/reflection.py +0 -0
  70. {fable_library-5.3.0 → fable_library-5.4.0}/fable_library/reg_exp.py +0 -0
  71. {fable_library-5.3.0 → fable_library-5.4.0}/fable_library/resize_array.py +0 -0
  72. {fable_library-5.3.0 → fable_library-5.4.0}/fable_library/singleton_local_time_zone.py +0 -0
  73. {fable_library-5.3.0 → fable_library-5.4.0}/fable_library/string_.py +0 -0
  74. {fable_library-5.3.0 → fable_library-5.4.0}/fable_library/system_text.py +0 -0
  75. {fable_library-5.3.0 → fable_library-5.4.0}/fable_library/task.py +0 -0
  76. {fable_library-5.3.0 → fable_library-5.4.0}/fable_library/task_builder.py +0 -0
  77. {fable_library-5.3.0 → fable_library-5.4.0}/fable_library/thread.py +0 -0
  78. {fable_library-5.3.0 → fable_library-5.4.0}/fable_library/time_only.py +0 -0
  79. {fable_library-5.3.0 → fable_library-5.4.0}/fable_library/time_span.py +0 -0
  80. {fable_library-5.3.0 → fable_library-5.4.0}/fable_library/timer.py +0 -0
  81. {fable_library-5.3.0 → fable_library-5.4.0}/fable_library/union.py +0 -0
  82. {fable_library-5.3.0 → fable_library-5.4.0}/fable_library/uri.py +0 -0
  83. {fable_library-5.3.0 → fable_library-5.4.0}/fable_library/util.py +0 -0
  84. {fable_library-5.3.0 → fable_library-5.4.0}/py.typed +0 -0
  85. {fable_library-5.3.0 → fable_library-5.4.0}/src/floats.rs +0 -0
  86. {fable_library-5.3.0 → fable_library-5.4.0}/src/ints.rs +0 -0
  87. {fable_library-5.3.0 → fable_library-5.4.0}/src/lib.rs +0 -0
  88. {fable_library-5.3.0 → fable_library-5.4.0}/src/native_array.rs +0 -0
  89. {fable_library-5.3.0 → fable_library-5.4.0}/src/options.rs +0 -0
  90. {fable_library-5.3.0 → fable_library-5.4.0}/src/strings.rs +0 -0
  91. {fable_library-5.3.0 → fable_library-5.4.0}/src/types.rs +0 -0
  92. {fable_library-5.3.0 → fable_library-5.4.0}/src/util.rs +0 -0
@@ -1,9 +1,9 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: fable-library
3
- Version: 5.3.0
3
+ Version: 5.4.0
4
4
  Summary: Fable library for Python
5
5
  Author-email: Dag Brattli <dag@brattli.net>
6
- License-Expression: MIT License
6
+ License-Expression: MIT
7
7
  Requires-Python: >=3.10, <4.0
8
8
  Description-Content-Type: text/markdown; charset=UTF-8; variant=GFM
9
9
  Project-URL: Homepage, https://fable.io
@@ -0,0 +1 @@
1
+ __version__ = "5.4.0"
@@ -10,6 +10,7 @@ from .option import value as value_1
10
10
  from .protocols import IComparer_1, IDisposable, IEqualityComparer, IEqualityComparer_1
11
11
  from .system import ArgumentNullException__ctor_Z721C83C5, NullReferenceException__ctor
12
12
  from .system_text import StringBuilder__Append_Z721C83C5
13
+ from .types import ExceptionBase
13
14
  from .util import UNIT, Unit, dispose, equals, ignore, structural_hash
14
15
 
15
16
 
@@ -52,7 +53,7 @@ def LanguagePrimitives_FastGenericEqualityComparerFromTable[T](__unit: Unit = UN
52
53
 
53
54
 
54
55
  def Operators_Failure(message: str) -> Exception:
55
- return Exception(message)
56
+ return ExceptionBase(message)
56
57
 
57
58
 
58
59
  def Operators_FailurePattern(exn: Exception) -> str | None:
@@ -42,6 +42,7 @@ from .protocols import IComparer_1, IEnumerable_1, IEnumerator, IEqualityCompare
42
42
  from .record import Record
43
43
  from .reflection import TypeInfo, class_type, option_type, record_type
44
44
  from .string_ import join
45
+ from .types import ExceptionBase
45
46
  from .util import (
46
47
  UNIT,
47
48
  Disposable,
@@ -304,7 +305,7 @@ def FSharpList__get_Item_Z524259A4[T](xs: FSharpList[T], index: int32) -> T:
304
305
 
305
306
 
306
307
  def index_not_found[_A](__unit: Unit = UNIT) -> _A:
307
- raise Exception(SR_keyNotFoundAlt)
308
+ raise ExceptionBase(SR_keyNotFoundAlt)
308
309
 
309
310
 
310
311
  def empty[_A](__unit: Unit = UNIT) -> FSharpList[_A]:
@@ -695,10 +696,10 @@ def map[T, U](mapping: Callable[[T], U], xs: FSharpList[T]) -> FSharpList[U]:
695
696
 
696
697
 
697
698
  def indexed[_A](xs: FSharpList[_A]) -> FSharpList[tuple[int32, _A]]:
698
- def _arrow51(i: int32, x: _A) -> tuple[int32, _A]:
699
+ def _arrow40(i: int32, x: _A) -> tuple[int32, _A]:
699
700
  return (i, x)
700
701
 
701
- return map_indexed(_arrow51, xs)
702
+ return map_indexed(_arrow40, xs)
702
703
 
703
704
 
704
705
  def map2[T1, T2, U](mapping: Callable[[T1, T2], U], xs: FSharpList[T1], ys: FSharpList[T2]) -> FSharpList[U]:
@@ -729,14 +730,14 @@ def map_indexed2[T1, T2, U](
729
730
  else:
730
731
  i_mut = i + int32.ONE
731
732
 
732
- def _arrow52(i: Any = i, acc: Any = acc, xs_1: Any = xs_1, ys_1: Any = ys_1) -> FSharpList[U]:
733
+ def _arrow41(i: Any = i, acc: Any = acc, xs_1: Any = xs_1, ys_1: Any = ys_1) -> FSharpList[U]:
733
734
  t: FSharpList[Any] = FSharpList(
734
735
  mapping(i, FSharpList__get_Head(xs_1), FSharpList__get_Head(ys_1)), None
735
736
  )
736
737
  acc.tail_ = t
737
738
  return t
738
739
 
739
- acc_mut = _arrow52()
740
+ acc_mut = _arrow41()
740
741
  xs_1_mut = FSharpList__get_Tail(xs_1)
741
742
  ys_1_mut = FSharpList__get_Tail(ys_1)
742
743
  continue
@@ -771,7 +772,7 @@ def map3[T1, T2, T3, U](
771
772
 
772
773
  else:
773
774
 
774
- def _arrow53(acc: Any = acc, xs_1: Any = xs_1, ys_1: Any = ys_1, zs_1: Any = zs_1) -> FSharpList[U]:
775
+ def _arrow42(acc: Any = acc, xs_1: Any = xs_1, ys_1: Any = ys_1, zs_1: Any = zs_1) -> FSharpList[U]:
775
776
  t: FSharpList[Any] = FSharpList(
776
777
  mapping(FSharpList__get_Head(xs_1), FSharpList__get_Head(ys_1), FSharpList__get_Head(zs_1)),
777
778
  None,
@@ -779,7 +780,7 @@ def map3[T1, T2, T3, U](
779
780
  acc.tail_ = t
780
781
  return t
781
782
 
782
- acc_mut = _arrow53()
783
+ acc_mut = _arrow42()
783
784
  xs_1_mut = FSharpList__get_Tail(xs_1)
784
785
  ys_1_mut = FSharpList__get_Tail(ys_1)
785
786
  zs_1_mut = FSharpList__get_Tail(zs_1)
@@ -804,12 +805,12 @@ def map_fold[STATE, T, RESULT](
804
805
  ) -> tuple[FSharpList[RESULT], STATE]:
805
806
  pattern_input: tuple[Any, Any] = mapping(tupled_arg[1], x)
806
807
 
807
- def _arrow54(tupled_arg: Any = tupled_arg) -> FSharpList[RESULT]:
808
+ def _arrow43(tupled_arg: Any = tupled_arg) -> FSharpList[RESULT]:
808
809
  t: FSharpList[Any] = FSharpList(pattern_input[0], None)
809
810
  tupled_arg[0].tail_ = t
810
811
  return t
811
812
 
812
- return (_arrow54(), pattern_input[1])
813
+ return (_arrow43(), pattern_input[1])
813
814
 
814
815
  pattern_input_1: tuple[FSharpList[Any], Any] = fold(folder, (root, state), xs)
815
816
  t_2: FSharpList[Any] = FSharpList_get_Empty()
@@ -820,10 +821,10 @@ def map_fold[STATE, T, RESULT](
820
821
  def map_fold_back[T, STATE, RESULT](
821
822
  mapping: Callable[[T, STATE], tuple[RESULT, STATE]], xs: FSharpList[T], state: STATE
822
823
  ) -> tuple[FSharpList[RESULT], STATE]:
823
- def _arrow55(acc: STATE, x: T, mapping: Any = mapping) -> tuple[RESULT, STATE]:
824
+ def _arrow48(acc: STATE, x: T, mapping: Any = mapping) -> tuple[RESULT, STATE]:
824
825
  return mapping(x, acc)
825
826
 
826
- return map_fold(_arrow55, state, reverse(xs))
827
+ return map_fold(_arrow48, state, reverse(xs))
827
828
 
828
829
 
829
830
  def try_pick[T, _A](f: Callable[[T], Option[_A]], xs: FSharpList[T]) -> Option[_A]:
@@ -1283,21 +1284,21 @@ def all_pairs[T1, T2](xs: FSharpList[T1], ys: FSharpList[T2]) -> FSharpList[tupl
1283
1284
  root: FSharpList[tuple[Any, Any]] = FSharpList_get_Empty()
1284
1285
  node: FSharpList[tuple[Any, Any]] = root
1285
1286
 
1286
- def _arrow87(x: T1 = UNIT, ys: Any = ys) -> None:
1287
- def _arrow86(y: T2 = UNIT) -> None:
1287
+ def _arrow81(x: T1 = UNIT, ys: Any = ys) -> None:
1288
+ def _arrow80(y: T2 = UNIT) -> None:
1288
1289
  nonlocal node
1289
1290
 
1290
- def _arrow85(__unit: Unit = UNIT) -> FSharpList[tuple[T1, T2]]:
1291
+ def _arrow79(__unit: Unit = UNIT) -> FSharpList[tuple[T1, T2]]:
1291
1292
  xs_1: FSharpList[tuple[Any, Any]] = node
1292
1293
  t: FSharpList[tuple[Any, Any]] = FSharpList((x, y), None)
1293
1294
  xs_1.tail_ = t
1294
1295
  return t
1295
1296
 
1296
- node = _arrow85()
1297
+ node = _arrow79()
1297
1298
 
1298
- iterate(_arrow86, ys)
1299
+ iterate(_arrow80, ys)
1299
1300
 
1300
- iterate(_arrow87, xs)
1301
+ iterate(_arrow81, xs)
1301
1302
  xs_3: FSharpList[tuple[Any, Any]] = node
1302
1303
  t_2: FSharpList[tuple[Any, Any]] = FSharpList_get_Empty()
1303
1304
  xs_3.tail_ = t_2
@@ -25,6 +25,7 @@ from .seq import pick as pick_1
25
25
  from .seq import try_pick as try_pick_1
26
26
  from .string_ import format, join
27
27
  from .system import NotSupportedException__ctor_Z721C83C5
28
+ from .types import ExceptionBase
28
29
  from .util import UNIT, Disposable, Unit, compare, equals, get_enumerator, ignore, nullable, range, structural_hash
29
30
 
30
31
 
@@ -349,7 +350,7 @@ def MapTreeModule_find[KEY, VALUE](
349
350
  ) -> VALUE:
350
351
  match_value: Option[Any] = MapTreeModule_tryFind(comparer, k, m)
351
352
  if match_value is None:
352
- raise Exception()
353
+ raise ExceptionBase()
353
354
 
354
355
  else:
355
356
  return value_1(match_value)
@@ -1243,7 +1244,7 @@ def MapTreeModule_leftmost[KEY, VALUE](m_mut: MapTreeLeaf_2[KEY, VALUE] | None)
1243
1244
  return (MapTreeLeaf_2__get_Key(m2), MapTreeLeaf_2__get_Value(m2))
1244
1245
 
1245
1246
  else:
1246
- raise Exception()
1247
+ raise ExceptionBase()
1247
1248
 
1248
1249
  break
1249
1250
 
@@ -1277,7 +1278,7 @@ def MapTreeModule_rightmost[KEY, VALUE](m_mut: MapTreeLeaf_2[KEY, VALUE] | None)
1277
1278
  return (MapTreeLeaf_2__get_Key(m2), MapTreeLeaf_2__get_Value(m2))
1278
1279
 
1279
1280
  else:
1280
- raise Exception()
1281
+ raise ExceptionBase()
1281
1282
 
1282
1283
  break
1283
1284
 
@@ -1608,7 +1609,7 @@ def pick[_A, _B, _C](chooser: Callable[[_A, _B], Option[_C]], table: FSharpMap[_
1608
1609
  return value_1(match_value)
1609
1610
 
1610
1611
  else:
1611
- raise Exception()
1612
+ raise ExceptionBase()
1612
1613
 
1613
1614
 
1614
1615
  def exists[_A, _B](predicate: Callable[[_A, _B], bool], table: FSharpMap[_A, _B]) -> bool:
@@ -16,6 +16,7 @@ from .resize_array import find_index
16
16
  from .seq import concat, delay, iterate_indexed, map
17
17
  from .string_ import format
18
18
  from .system import ArgumentException__ctor_Z721C83C5
19
+ from .types import ExceptionBase
19
20
  from .types import FSharpRef as FSharpRef_1
20
21
  from .util import UNIT, Disposable, Unit, dispose, equals, get_enumerator, ignore, nullable, to_enumerable
21
22
 
@@ -276,7 +277,7 @@ def Dictionary__get_Item_2B595[KEY, VALUE](this: Dictionary[KEY, VALUE], k: KEY)
276
277
  return match_value[1]
277
278
 
278
279
  else:
279
- raise Exception("The item was not found in collection")
280
+ raise ExceptionBase("The item was not found in collection")
280
281
 
281
282
 
282
283
  def Dictionary__set_Item_5BDDA1[KEY, VALUE](this: Dictionary[KEY, VALUE], k: KEY, v: VALUE) -> None:
@@ -19,7 +19,7 @@ from .types import FSharpRef
19
19
  from .util import UNIT, Disposable, Unit, dispose, get_enumerator, ignore, to_enumerable
20
20
 
21
21
 
22
- def _expr8(gen0: TypeInfo) -> TypeInfo:
22
+ def _expr9(gen0: TypeInfo) -> TypeInfo:
23
23
  return class_type("Fable.Collections.HashSet", Array([gen0]), HashSet)
24
24
 
25
25
 
@@ -111,7 +111,7 @@ class HashSet[T](MutableSet[Any], Set[Any], EnumerableBase[Any]):
111
111
  self.Remove(value)
112
112
 
113
113
 
114
- HashSet_reflection = _expr8
114
+ HashSet_reflection = _expr9
115
115
 
116
116
 
117
117
  def HashSet__ctor_Z6150332D[T](items: IEnumerable_1[T], comparer: IEqualityComparer_1[Any]) -> HashSet[T]:
@@ -25,7 +25,7 @@ def make_range_step_function[T](
25
25
 
26
26
  step_greater_than_zero: bool = step_compared_with_zero > int32.ZERO
27
27
 
28
- def _arrow79(x: T = UNIT, step: Any = step, stop: Any = stop, add: Any = add) -> tuple[T, T] | None:
28
+ def _arrow82(x: T = UNIT, step: Any = step, stop: Any = stop, add: Any = add) -> tuple[T, T] | None:
29
29
  compared_with_last: int32 = compare(x, stop)
30
30
  return (
31
31
  ((x, add(x, step)))
@@ -37,16 +37,16 @@ def make_range_step_function[T](
37
37
  else None
38
38
  )
39
39
 
40
- return _arrow79
40
+ return _arrow82
41
41
 
42
42
 
43
43
  def integral_range_step[T](start: T, step: T, stop: T, zero: T, add: Callable[[T, T], T]) -> IEnumerable_1[T]:
44
44
  step_fn: Callable[[Any], tuple[Any, Any] | None] = erase(make_range_step_function(step, stop, zero, add))
45
45
 
46
- def _arrow80(start: Any = start) -> IEnumerable_1[T]:
46
+ def _arrow83(start: Any = start) -> IEnumerable_1[T]:
47
47
  return unfold(step_fn, start)
48
48
 
49
- return delay(_arrow80)
49
+ return delay(_arrow83)
50
50
 
51
51
 
52
52
  def range_big_int(start: int, step: int, stop: int) -> IEnumerable_1[int]:
@@ -60,24 +60,24 @@ def range_decimal(start: Decimal, step: Decimal, stop: Decimal) -> IEnumerable_1
60
60
 
61
61
 
62
62
  def range_double(start: float64, step: float64, stop: float64) -> IEnumerable_1[float64]:
63
- def _arrow81(x: float64, y: float64) -> float64:
63
+ def _arrow84(x: float64, y: float64) -> float64:
64
64
  return x + y
65
65
 
66
- return integral_range_step(start, step, stop, float64(0.0), _arrow81)
66
+ return integral_range_step(start, step, stop, float64(0.0), _arrow84)
67
67
 
68
68
 
69
69
  def range_int32(start: int32, step: int32, stop: int32) -> IEnumerable_1[int32]:
70
- def _arrow82(x: int32, y: int32) -> int32:
70
+ def _arrow85(x: int32, y: int32) -> int32:
71
71
  return x + y
72
72
 
73
- return integral_range_step(start, step, stop, int32.ZERO, _arrow82)
73
+ return integral_range_step(start, step, stop, int32.ZERO, _arrow85)
74
74
 
75
75
 
76
76
  def range_uint32(start: uint32, step: uint32, stop: uint32) -> IEnumerable_1[uint32]:
77
- def _arrow83(x: uint32, y: uint32) -> uint32:
77
+ def _arrow86(x: uint32, y: uint32) -> uint32:
78
78
  return x + y
79
79
 
80
- return integral_range_step(start, step, stop, uint32.ZERO, _arrow83)
80
+ return integral_range_step(start, step, stop, uint32.ZERO, _arrow86)
81
81
 
82
82
 
83
83
  def range_int64(start: int64, step: int64, stop: int64) -> IEnumerable_1[int64]:
@@ -91,7 +91,7 @@ def range_uint64(start: uint64, step: uint64, stop: uint64) -> IEnumerable_1[uin
91
91
  def range_char(start: str, stop: str) -> IEnumerable_1[str]:
92
92
  int_stop: int32 = int32(char_code_at(stop, int32.ZERO))
93
93
 
94
- def _arrow84(start: Any = start) -> IEnumerable_1[str]:
94
+ def _arrow87(start: Any = start) -> IEnumerable_1[str]:
95
95
  def step_fn(i: int32) -> tuple[str, int32] | None:
96
96
  if i <= int_stop:
97
97
  return (chr(int(i)), i + int32.ONE)
@@ -101,7 +101,7 @@ def range_char(start: str, stop: str) -> IEnumerable_1[str]:
101
101
 
102
102
  return unfold(step_fn, int32(char_code_at(start, int32.ZERO)))
103
103
 
104
- return delay(_arrow84)
104
+ return delay(_arrow87)
105
105
 
106
106
 
107
107
  __all__ = [
@@ -12,7 +12,7 @@ from .union import Union, tagged_union
12
12
  from .util import equals
13
13
 
14
14
 
15
- def _expr9(gen0: TypeInfo, gen1: TypeInfo) -> TypeInfo:
15
+ def _expr8(gen0: TypeInfo, gen1: TypeInfo) -> TypeInfo:
16
16
  return union_type(
17
17
  "FSharp.Core.FSharpResult`2",
18
18
  Array([gen0, gen1]),
@@ -40,7 +40,7 @@ class Error[T, TERROR](_FSharpResult_2[T, TERROR]):
40
40
 
41
41
  type FSharpResult_2[T, TERROR] = Ok[T, TERROR] | Error[T, TERROR]
42
42
 
43
- FSharpResult_2_reflection = _expr9
43
+ FSharpResult_2_reflection = _expr8
44
44
 
45
45
 
46
46
  def Result_Map[A, B, C](mapping: Callable[[A], B], result: FSharpResult_2[A, C]) -> FSharpResult_2[B, C]:
@@ -48,6 +48,7 @@ from .option import value as value_1
48
48
  from .protocols import IComparer_1, IDisposable, IEnumerable, IEnumerable_1, IEnumerator, IEqualityComparer_1
49
49
  from .reflection import TypeInfo, class_type
50
50
  from .system import InvalidOperationException__ctor_Z721C83C5, NotSupportedException__ctor_Z721C83C5
51
+ from .types import ExceptionBase
51
52
  from .util import (
52
53
  UNIT,
53
54
  Disposable,
@@ -396,7 +397,7 @@ def Enumerator_unfold[STATE, T](f: Callable[[STATE], tuple[T, STATE] | None], st
396
397
 
397
398
 
398
399
  def index_not_found[_A](__unit: Unit = UNIT) -> _A:
399
- raise Exception(SR_keyNotFoundAlt)
400
+ raise ExceptionBase(SR_keyNotFoundAlt)
400
401
 
401
402
 
402
403
  def mk_seq[T](f: Callable[[], IEnumerator[T]]) -> IEnumerable_1[T]:
@@ -15,7 +15,7 @@ from .util import UNIT, Disposable, Unit, get_enumerator, to_enumerable
15
15
 
16
16
 
17
17
  def distinct[T](xs: IEnumerable_1[T], comparer: IEqualityComparer_1[Any]) -> IEnumerable_1[T]:
18
- def _arrow40(xs: Any = xs, comparer: Any = comparer) -> IEnumerable_1[T]:
18
+ def _arrow44(xs: Any = xs, comparer: Any = comparer) -> IEnumerable_1[T]:
19
19
  hash_set: Any = HashSet(Array[Any]([]), comparer)
20
20
 
21
21
  def predicate(x: T = UNIT) -> bool:
@@ -23,13 +23,13 @@ def distinct[T](xs: IEnumerable_1[T], comparer: IEqualityComparer_1[Any]) -> IEn
23
23
 
24
24
  return filter(predicate, xs)
25
25
 
26
- return delay(_arrow40)
26
+ return delay(_arrow44)
27
27
 
28
28
 
29
29
  def distinct_by[T, KEY](
30
30
  projection: Callable[[T], KEY], xs: IEnumerable_1[T], comparer: IEqualityComparer_1[Any]
31
31
  ) -> IEnumerable_1[T]:
32
- def _arrow41(projection: Any = projection, xs: Any = xs, comparer: Any = comparer) -> IEnumerable_1[T]:
32
+ def _arrow45(projection: Any = projection, xs: Any = xs, comparer: Any = comparer) -> IEnumerable_1[T]:
33
33
  hash_set: Any = HashSet(Array[Any]([]), comparer)
34
34
 
35
35
  def predicate(x: T = UNIT) -> bool:
@@ -37,13 +37,13 @@ def distinct_by[T, KEY](
37
37
 
38
38
  return filter(predicate, xs)
39
39
 
40
- return delay(_arrow41)
40
+ return delay(_arrow45)
41
41
 
42
42
 
43
43
  def except_[T](
44
44
  items_to_exclude: IEnumerable_1[T], xs: IEnumerable_1[T], comparer: IEqualityComparer_1[Any]
45
45
  ) -> IEnumerable_1[T]:
46
- def _arrow42(items_to_exclude: Any = items_to_exclude, xs: Any = xs, comparer: Any = comparer) -> IEnumerable_1[T]:
46
+ def _arrow46(items_to_exclude: Any = items_to_exclude, xs: Any = xs, comparer: Any = comparer) -> IEnumerable_1[T]:
47
47
  hash_set: Any = HashSet(items_to_exclude, comparer)
48
48
 
49
49
  def predicate(x: T = UNIT) -> bool:
@@ -51,13 +51,13 @@ def except_[T](
51
51
 
52
52
  return filter(predicate, xs)
53
53
 
54
- return delay(_arrow42)
54
+ return delay(_arrow46)
55
55
 
56
56
 
57
57
  def count_by[T, KEY](
58
58
  projection: Callable[[T], KEY], xs: IEnumerable_1[T], comparer: IEqualityComparer_1[Any]
59
59
  ) -> IEnumerable_1[tuple[KEY, int32]]:
60
- def _arrow46(
60
+ def _arrow51(
61
61
  projection: Any = projection, xs: Any = xs, comparer: Any = comparer
62
62
  ) -> IEnumerable_1[tuple[KEY, int32]]:
63
63
  dict_1: Any = Dictionary(Array[Any]([]), comparer)
@@ -68,14 +68,14 @@ def count_by[T, KEY](
68
68
  match_value: tuple[bool, int32]
69
69
  out_arg: int32 = int32.ZERO
70
70
 
71
- def _arrow43(__unit: Unit = UNIT) -> int32:
71
+ def _arrow47(__unit: Unit = UNIT) -> int32:
72
72
  return out_arg
73
73
 
74
- def _arrow44(v: int32) -> None:
74
+ def _arrow49(v: int32) -> None:
75
75
  nonlocal out_arg
76
76
  out_arg = v
77
77
 
78
- match_value = (try_get_value(dict_1, key, FSharpRef(_arrow43, _arrow44)), out_arg)
78
+ match_value = (try_get_value(dict_1, key, FSharpRef(_arrow47, _arrow49)), out_arg)
79
79
  if match_value[0]:
80
80
  dict_1[key] = match_value[1] + int32.ONE
81
81
 
@@ -83,18 +83,18 @@ def count_by[T, KEY](
83
83
  dict_1[key] = int32.ONE
84
84
  (keys.append(key))
85
85
 
86
- def _arrow45(key_1: KEY = UNIT) -> tuple[KEY, int32]:
86
+ def _arrow50(key_1: KEY = UNIT) -> tuple[KEY, int32]:
87
87
  return (key_1, get_item_from_dict(dict_1, key_1))
88
88
 
89
- return map(_arrow45, to_enumerable(keys))
89
+ return map(_arrow50, to_enumerable(keys))
90
90
 
91
- return delay(_arrow46)
91
+ return delay(_arrow51)
92
92
 
93
93
 
94
94
  def group_by[T, KEY](
95
95
  projection: Callable[[T], KEY], xs: IEnumerable_1[T], comparer: IEqualityComparer_1[Any]
96
96
  ) -> IEnumerable_1[tuple[KEY, IEnumerable_1[T]]]:
97
- def _arrow50(
97
+ def _arrow55(
98
98
  projection: Any = projection, xs: Any = xs, comparer: Any = comparer
99
99
  ) -> IEnumerable_1[tuple[KEY, IEnumerable_1[T]]]:
100
100
  dict_1: Any = Dictionary(Array[Any]([]), comparer)
@@ -106,14 +106,14 @@ def group_by[T, KEY](
106
106
  match_value: tuple[bool, list[Any]]
107
107
  out_arg: list[Any] = cast(list[Any], None)
108
108
 
109
- def _arrow47(__unit: Unit = UNIT) -> list[T]:
109
+ def _arrow52(__unit: Unit = UNIT) -> list[T]:
110
110
  return out_arg
111
111
 
112
- def _arrow48(v: list[T]) -> None:
112
+ def _arrow53(v: list[T]) -> None:
113
113
  nonlocal out_arg
114
114
  out_arg = v
115
115
 
116
- match_value = (try_get_value(dict_1, key, FSharpRef(_arrow47, _arrow48)), out_arg)
116
+ match_value = (try_get_value(dict_1, key, FSharpRef(_arrow52, _arrow53)), out_arg)
117
117
  if match_value[0]:
118
118
  (match_value[1].append(x))
119
119
 
@@ -121,12 +121,12 @@ def group_by[T, KEY](
121
121
  add_to_dict(dict_1, key, [x])
122
122
  (keys.append(key))
123
123
 
124
- def _arrow49(key_1: KEY = UNIT) -> tuple[KEY, IEnumerable_1[T]]:
124
+ def _arrow54(key_1: KEY = UNIT) -> tuple[KEY, IEnumerable_1[T]]:
125
125
  return (key_1, to_enumerable(get_item_from_dict(dict_1, key_1)))
126
126
 
127
- return map(_arrow49, to_enumerable(keys))
127
+ return map(_arrow54, to_enumerable(keys))
128
128
 
129
- return delay(_arrow50)
129
+ return delay(_arrow55)
130
130
 
131
131
 
132
132
  def Array_distinct[T](xs: Array[T], comparer: IEqualityComparer_1[Any]) -> Array[T]:
@@ -40,7 +40,7 @@ from .system import NotSupportedException__ctor_Z721C83C5
40
40
  from .util import UNIT, Disposable, Unit, get_enumerator, ignore, nullable, structural_hash
41
41
 
42
42
 
43
- def _expr216(gen0: TypeInfo) -> TypeInfo:
43
+ def _expr197(gen0: TypeInfo) -> TypeInfo:
44
44
  return class_type("Set.SetTreeLeaf`1", Array([gen0]), SetTreeLeaf_1)
45
45
 
46
46
 
@@ -49,7 +49,7 @@ class SetTreeLeaf_1[T]:
49
49
  self.k: Any = k
50
50
 
51
51
 
52
- SetTreeLeaf_1_reflection = _expr216
52
+ SetTreeLeaf_1_reflection = _expr197
53
53
 
54
54
 
55
55
  def SetTreeLeaf_1__ctor_2B595[T](k: T = UNIT) -> SetTreeLeaf_1[T]:
@@ -60,7 +60,7 @@ def SetTreeLeaf_1__get_Key[T](_: SetTreeLeaf_1[T]) -> T:
60
60
  return _.k
61
61
 
62
62
 
63
- def _expr217(gen0: TypeInfo) -> TypeInfo:
63
+ def _expr198(gen0: TypeInfo) -> TypeInfo:
64
64
  return class_type("Set.SetTreeNode`1", Array([gen0]), SetTreeNode_1, SetTreeLeaf_1_reflection(gen0))
65
65
 
66
66
 
@@ -72,7 +72,7 @@ class SetTreeNode_1[T](SetTreeLeaf_1):
72
72
  self.h: int32 = h
73
73
 
74
74
 
75
- SetTreeNode_1_reflection = _expr217
75
+ SetTreeNode_1_reflection = _expr198
76
76
 
77
77
 
78
78
  def SetTreeNode_1__ctor_5F465FC9[T](
@@ -174,7 +174,7 @@ def SetTreeModule_rebalance[T](
174
174
  if isinstance(match_value, SetTreeNode_1):
175
175
  t2_0027: SetTreeNode_1[Any] = match_value
176
176
 
177
- def _arrow218(__unit: Unit = UNIT) -> int32:
177
+ def _arrow201(__unit: Unit = UNIT) -> int32:
178
178
  t_2: SetTreeLeaf_1[Any] | None = erase(SetTreeNode_1__get_Left(t2_0027))
179
179
  if t_2 is not None:
180
180
  t2_3: SetTreeLeaf_1[Any] = t_2
@@ -183,7 +183,7 @@ def SetTreeModule_rebalance[T](
183
183
  else:
184
184
  return int32.ZERO
185
185
 
186
- if _arrow218() > (t1h + int32.ONE):
186
+ if _arrow201() > (t1h + int32.ONE):
187
187
  match_value_1: SetTreeLeaf_1[Any] = value_1(SetTreeNode_1__get_Left(t2_0027))
188
188
  if isinstance(match_value_1, SetTreeNode_1):
189
189
  t2l: SetTreeNode_1[Any] = match_value_1
@@ -219,7 +219,7 @@ def SetTreeModule_rebalance[T](
219
219
  if isinstance(match_value_2, SetTreeNode_1):
220
220
  t1_0027: SetTreeNode_1[Any] = match_value_2
221
221
 
222
- def _arrow219(__unit: Unit = UNIT) -> int32:
222
+ def _arrow204(__unit: Unit = UNIT) -> int32:
223
223
  t_3: SetTreeLeaf_1[Any] | None = erase(SetTreeNode_1__get_Right(t1_0027))
224
224
  if t_3 is not None:
225
225
  t2_4: SetTreeLeaf_1[Any] = t_3
@@ -228,7 +228,7 @@ def SetTreeModule_rebalance[T](
228
228
  else:
229
229
  return int32.ZERO
230
230
 
231
- if _arrow219() > (t2h + int32.ONE):
231
+ if _arrow204() > (t2h + int32.ONE):
232
232
  match_value_3: SetTreeLeaf_1[Any] = value_1(SetTreeNode_1__get_Right(t1_0027))
233
233
  if isinstance(match_value_3, SetTreeNode_1):
234
234
  t1r: SetTreeNode_1[Any] = match_value_3