koatl 0.2.3__tar.gz → 0.3.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 (138) hide show
  1. koatl-0.3.0/Cargo.lock +444 -0
  2. {koatl-0.2.3 → koatl-0.3.0}/PKG-INFO +1 -1
  3. {koatl-0.2.3 → koatl-0.3.0}/koatl/Cargo.toml +1 -1
  4. {koatl-0.2.3 → koatl-0.3.0/koatl}/python/koatl/prelude/__init__.tl +5 -5
  5. {koatl-0.2.3 → koatl-0.3.0/koatl}/python/koatl/std/alg/async.tl +7 -7
  6. {koatl-0.2.3 → koatl-0.3.0/koatl}/python/koatl/std/alg/base.tl +5 -5
  7. {koatl-0.2.3 → koatl-0.3.0/koatl}/python/koatl/std/alg/do.tl +1 -1
  8. {koatl-0.2.3 → koatl-0.3.0}/koatl/python/koatl/std/alg/env.tl +4 -4
  9. {koatl-0.2.3 → koatl-0.3.0}/koatl/python/koatl/std/alg/memo.tl +6 -6
  10. {koatl-0.2.3 → koatl-0.3.0}/koatl/python/koatl/std/alg/result.tl +2 -2
  11. {koatl-0.2.3 → koatl-0.3.0/koatl}/python/koatl/std/data/list.tl +2 -2
  12. {koatl-0.2.3 → koatl-0.3.0/koatl}/python/koatl/std/iter.tl +1 -1
  13. {koatl-0.2.3 → koatl-0.3.0/koatl}/python/koatl/std/re.tl +2 -2
  14. {koatl-0.2.3 → koatl-0.3.0}/koatl/tests/e2e/base/fstr.tl +2 -2
  15. {koatl-0.2.3 → koatl-0.3.0}/koatl/tests/e2e/prelude/memo.tl +2 -2
  16. {koatl-0.2.3 → koatl-0.3.0}/koatl/tests/e2e/prelude/virtual.tl +7 -7
  17. koatl-0.3.0/koatl/tests/parse/deco.tl +2 -0
  18. {koatl-0.2.3 → koatl-0.3.0}/koatl-core/Cargo.toml +1 -4
  19. {koatl-0.2.3 → koatl-0.3.0}/koatl-core/src/lift_cst.rs +51 -91
  20. {koatl-0.2.3 → koatl-0.3.0}/koatl-core/src/main.rs +35 -11
  21. {koatl-0.2.3 → koatl-0.3.0}/koatl-parser/src/cst.rs +49 -49
  22. {koatl-0.2.3 → koatl-0.3.0}/koatl-parser/src/lexer.rs +160 -115
  23. {koatl-0.2.3 → koatl-0.3.0}/koatl-parser/src/lib.rs +1 -1
  24. {koatl-0.2.3 → koatl-0.3.0}/koatl-parser/src/parser.rs +139 -73
  25. {koatl-0.2.3 → koatl-0.3.0}/koatl-parser/src/simple_fmt.rs +50 -46
  26. {koatl-0.2.3/koatl → koatl-0.3.0}/python/koatl/prelude/__init__.tl +5 -5
  27. {koatl-0.2.3/koatl → koatl-0.3.0}/python/koatl/std/alg/async.tl +7 -7
  28. {koatl-0.2.3/koatl → koatl-0.3.0}/python/koatl/std/alg/base.tl +5 -5
  29. {koatl-0.2.3/koatl → koatl-0.3.0}/python/koatl/std/alg/do.tl +1 -1
  30. {koatl-0.2.3 → koatl-0.3.0}/python/koatl/std/alg/env.tl +4 -4
  31. {koatl-0.2.3 → koatl-0.3.0}/python/koatl/std/alg/memo.tl +6 -6
  32. {koatl-0.2.3 → koatl-0.3.0}/python/koatl/std/alg/result.tl +2 -2
  33. {koatl-0.2.3/koatl → koatl-0.3.0}/python/koatl/std/data/list.tl +2 -2
  34. {koatl-0.2.3/koatl → koatl-0.3.0}/python/koatl/std/iter.tl +1 -1
  35. {koatl-0.2.3/koatl → koatl-0.3.0}/python/koatl/std/re.tl +2 -2
  36. koatl-0.2.3/Cargo.lock +0 -218
  37. koatl-0.2.3/koatl/tests/parse/deco.tl +0 -2
  38. koatl-0.2.3/koatl-core/src/parse_timer.rs +0 -34
  39. {koatl-0.2.3 → koatl-0.3.0}/Cargo.toml +0 -0
  40. {koatl-0.2.3 → koatl-0.3.0}/README.md +0 -0
  41. {koatl-0.2.3 → koatl-0.3.0}/koatl/.github/workflows/CI.yml +0 -0
  42. {koatl-0.2.3 → koatl-0.3.0}/koatl/.gitignore +0 -0
  43. {koatl-0.2.3 → koatl-0.3.0}/koatl/LICENSE +0 -0
  44. {koatl-0.2.3 → koatl-0.3.0}/koatl/README.md +0 -0
  45. {koatl-0.2.3 → koatl-0.3.0}/koatl/python/koatl/__init__.py +0 -0
  46. {koatl-0.2.3 → koatl-0.3.0}/koatl/python/koatl/__main__.py +0 -0
  47. {koatl-0.2.3 → koatl-0.3.0}/koatl/python/koatl/cli.py +0 -0
  48. {koatl-0.2.3 → koatl-0.3.0}/koatl/python/koatl/notebook/__init__.py +0 -0
  49. {koatl-0.2.3 → koatl-0.3.0}/koatl/python/koatl/notebook/magic.py +0 -0
  50. {koatl-0.2.3 → koatl-0.3.0}/koatl/python/koatl/runtime/__init__.py +0 -0
  51. {koatl-0.2.3 → koatl-0.3.0}/koatl/python/koatl/runtime/meta_finder.py +0 -0
  52. {koatl-0.2.3 → koatl-0.3.0}/koatl/python/koatl/runtime/record.py +0 -0
  53. {koatl-0.2.3 → koatl-0.3.0}/koatl/python/koatl/runtime/vattr.py +0 -0
  54. {koatl-0.2.3 → koatl-0.3.0}/koatl/python/koatl/std/alg/__init__.tl +0 -0
  55. {koatl-0.2.3 → koatl-0.3.0}/koatl/python/koatl/std/data/__init__.tl +0 -0
  56. {koatl-0.2.3 → koatl-0.3.0}/koatl/python/koatl/std/data/record.tl +0 -0
  57. {koatl-0.2.3 → koatl-0.3.0}/koatl/python/koatl/std/ext.tl +0 -0
  58. {koatl-0.2.3 → koatl-0.3.0}/koatl/python/koatl/std/io.tl +0 -0
  59. {koatl-0.2.3 → koatl-0.3.0}/koatl/python/koatl/std/json.tl +0 -0
  60. {koatl-0.2.3 → koatl-0.3.0}/koatl/python/koatl/std/lazy_module.tl +0 -0
  61. {koatl-0.2.3 → koatl-0.3.0}/koatl/python/koatl/std/pickle.tl +0 -0
  62. {koatl-0.2.3 → koatl-0.3.0}/koatl/python/koatl/std/trait.py +0 -0
  63. {koatl-0.2.3 → koatl-0.3.0}/koatl/requirements.txt +0 -0
  64. {koatl-0.2.3 → koatl-0.3.0}/koatl/src/emit_py.rs +0 -0
  65. {koatl-0.2.3 → koatl-0.3.0}/koatl/src/lib.rs +0 -0
  66. {koatl-0.2.3 → koatl-0.3.0}/koatl/tests/e2e/base/containers.tl +0 -0
  67. {koatl-0.2.3 → koatl-0.3.0}/koatl/tests/e2e/base/data.txt +0 -0
  68. {koatl-0.2.3 → koatl-0.3.0}/koatl/tests/e2e/base/decorators.tl +0 -0
  69. {koatl-0.2.3 → koatl-0.3.0}/koatl/tests/e2e/base/destructure-for-and-fn.tl +0 -0
  70. {koatl-0.2.3 → koatl-0.3.0}/koatl/tests/e2e/base/destructure.tl +0 -0
  71. {koatl-0.2.3 → koatl-0.3.0}/koatl/tests/e2e/base/escape_ident.tl +0 -0
  72. {koatl-0.2.3 → koatl-0.3.0}/koatl/tests/e2e/base/functions.tl +0 -0
  73. {koatl-0.2.3 → koatl-0.3.0}/koatl/tests/e2e/base/generator.tl +0 -0
  74. {koatl-0.2.3 → koatl-0.3.0}/koatl/tests/e2e/base/if_expr.tl +0 -0
  75. {koatl-0.2.3 → koatl-0.3.0}/koatl/tests/e2e/base/loops.tl +0 -0
  76. {koatl-0.2.3 → koatl-0.3.0}/koatl/tests/e2e/base/match.tl +0 -0
  77. {koatl-0.2.3 → koatl-0.3.0}/koatl/tests/e2e/base/nary-list.tl +0 -0
  78. {koatl-0.2.3 → koatl-0.3.0}/koatl/tests/e2e/base/placeholder.tl +0 -0
  79. {koatl-0.2.3 → koatl-0.3.0}/koatl/tests/e2e/base/precedence.tl +0 -0
  80. {koatl-0.2.3 → koatl-0.3.0}/koatl/tests/e2e/base/scopes.tl +0 -0
  81. {koatl-0.2.3 → koatl-0.3.0}/koatl/tests/e2e/base/semantic_whitespace.tl +0 -0
  82. {koatl-0.2.3 → koatl-0.3.0}/koatl/tests/e2e/base/short_circuit.tl +0 -0
  83. {koatl-0.2.3 → koatl-0.3.0}/koatl/tests/e2e/base/with.tl +0 -0
  84. {koatl-0.2.3 → koatl-0.3.0}/koatl/tests/e2e/prelude/async.tl +0 -0
  85. {koatl-0.2.3 → koatl-0.3.0}/koatl/tests/e2e/prelude/aug_assign.tl +0 -0
  86. {koatl-0.2.3 → koatl-0.3.0}/koatl/tests/e2e/prelude/coal.tl +0 -0
  87. {koatl-0.2.3 → koatl-0.3.0}/koatl/tests/e2e/prelude/env.tl +0 -0
  88. {koatl-0.2.3 → koatl-0.3.0}/koatl/tests/e2e/prelude/imports.tl +0 -0
  89. {koatl-0.2.3 → koatl-0.3.0}/koatl/tests/e2e/prelude/iterables.tl +0 -0
  90. {koatl-0.2.3 → koatl-0.3.0}/koatl/tests/e2e/prelude/list.tl +0 -0
  91. {koatl-0.2.3 → koatl-0.3.0}/koatl/tests/e2e/prelude/record.tl +0 -0
  92. {koatl-0.2.3 → koatl-0.3.0}/koatl/tests/e2e/prelude/result.tl +0 -0
  93. {koatl-0.2.3 → koatl-0.3.0}/koatl/tests/e2e/prelude/slice.tl +0 -0
  94. {koatl-0.2.3 → koatl-0.3.0}/koatl/tests/e2e/prelude/try.tl +0 -0
  95. {koatl-0.2.3 → koatl-0.3.0}/koatl/tests/e2e/util/__init__.py +0 -0
  96. {koatl-0.2.3 → koatl-0.3.0}/koatl/tests/e2e/util/module0.tl +0 -0
  97. {koatl-0.2.3 → koatl-0.3.0}/koatl/tests/e2e/util/module1.tl +0 -0
  98. {koatl-0.2.3 → koatl-0.3.0}/koatl/tests/e2e/util/module2.tl +0 -0
  99. {koatl-0.2.3 → koatl-0.3.0}/koatl/tests/parse/arith.tl +0 -0
  100. {koatl-0.2.3 → koatl-0.3.0}/koatl/tests/parse/assign.tl +0 -0
  101. {koatl-0.2.3 → koatl-0.3.0}/koatl/tests/parse/block-comments.tl +0 -0
  102. {koatl-0.2.3 → koatl-0.3.0}/koatl/tests/parse/func.tl +0 -0
  103. {koatl-0.2.3 → koatl-0.3.0}/koatl/tests/parse/matches.tl +0 -0
  104. {koatl-0.2.3 → koatl-0.3.0}/koatl/tests/parse/numbers.tl +0 -0
  105. {koatl-0.2.3 → koatl-0.3.0}/koatl/tests/test_e2e.py +0 -0
  106. {koatl-0.2.3 → koatl-0.3.0}/koatl/tests/test_parse.py +0 -0
  107. {koatl-0.2.3 → koatl-0.3.0}/koatl-core/src/ast.rs +0 -0
  108. {koatl-0.2.3 → koatl-0.3.0}/koatl-core/src/ast_builder.rs +0 -0
  109. {koatl-0.2.3 → koatl-0.3.0}/koatl-core/src/inference.rs +0 -0
  110. {koatl-0.2.3 → koatl-0.3.0}/koatl-core/src/lib.rs +0 -0
  111. {koatl-0.2.3 → koatl-0.3.0}/koatl-core/src/py/ast.rs +0 -0
  112. {koatl-0.2.3 → koatl-0.3.0}/koatl-core/src/py/ast_builder.rs +0 -0
  113. {koatl-0.2.3 → koatl-0.3.0}/koatl-core/src/py/emit.rs +0 -0
  114. {koatl-0.2.3 → koatl-0.3.0}/koatl-core/src/py/mod.rs +0 -0
  115. {koatl-0.2.3 → koatl-0.3.0}/koatl-core/src/resolve_scopes.rs +0 -0
  116. {koatl-0.2.3 → koatl-0.3.0}/koatl-core/src/transform.rs +0 -0
  117. {koatl-0.2.3 → koatl-0.3.0}/koatl-core/src/types.rs +0 -0
  118. {koatl-0.2.3 → koatl-0.3.0}/koatl-core/src/util.rs +0 -0
  119. {koatl-0.2.3 → koatl-0.3.0}/koatl-parser/Cargo.toml +0 -0
  120. {koatl-0.2.3 → koatl-0.3.0}/pyproject.toml +0 -0
  121. {koatl-0.2.3 → koatl-0.3.0}/python/koatl/__init__.py +0 -0
  122. {koatl-0.2.3 → koatl-0.3.0}/python/koatl/__main__.py +0 -0
  123. {koatl-0.2.3 → koatl-0.3.0}/python/koatl/cli.py +0 -0
  124. {koatl-0.2.3 → koatl-0.3.0}/python/koatl/notebook/__init__.py +0 -0
  125. {koatl-0.2.3 → koatl-0.3.0}/python/koatl/notebook/magic.py +0 -0
  126. {koatl-0.2.3 → koatl-0.3.0}/python/koatl/runtime/__init__.py +0 -0
  127. {koatl-0.2.3 → koatl-0.3.0}/python/koatl/runtime/meta_finder.py +0 -0
  128. {koatl-0.2.3 → koatl-0.3.0}/python/koatl/runtime/record.py +0 -0
  129. {koatl-0.2.3 → koatl-0.3.0}/python/koatl/runtime/vattr.py +0 -0
  130. {koatl-0.2.3 → koatl-0.3.0}/python/koatl/std/alg/__init__.tl +0 -0
  131. {koatl-0.2.3 → koatl-0.3.0}/python/koatl/std/data/__init__.tl +0 -0
  132. {koatl-0.2.3 → koatl-0.3.0}/python/koatl/std/data/record.tl +0 -0
  133. {koatl-0.2.3 → koatl-0.3.0}/python/koatl/std/ext.tl +0 -0
  134. {koatl-0.2.3 → koatl-0.3.0}/python/koatl/std/io.tl +0 -0
  135. {koatl-0.2.3 → koatl-0.3.0}/python/koatl/std/json.tl +0 -0
  136. {koatl-0.2.3 → koatl-0.3.0}/python/koatl/std/lazy_module.tl +0 -0
  137. {koatl-0.2.3 → koatl-0.3.0}/python/koatl/std/pickle.tl +0 -0
  138. {koatl-0.2.3 → koatl-0.3.0}/python/koatl/std/trait.py +0 -0
koatl-0.3.0/Cargo.lock ADDED
@@ -0,0 +1,444 @@
1
+ # This file is automatically @generated by Cargo.
2
+ # It is not intended for manual editing.
3
+ version = 4
4
+
5
+ [[package]]
6
+ name = "anstream"
7
+ version = "0.6.20"
8
+ source = "registry+https://github.com/rust-lang/crates.io-index"
9
+ checksum = "3ae563653d1938f79b1ab1b5e668c87c76a9930414574a6583a7b7e11a8e6192"
10
+ dependencies = [
11
+ "anstyle",
12
+ "anstyle-parse",
13
+ "anstyle-query",
14
+ "anstyle-wincon",
15
+ "colorchoice",
16
+ "is_terminal_polyfill",
17
+ "utf8parse",
18
+ ]
19
+
20
+ [[package]]
21
+ name = "anstyle"
22
+ version = "1.0.11"
23
+ source = "registry+https://github.com/rust-lang/crates.io-index"
24
+ checksum = "862ed96ca487e809f1c8e5a8447f6ee2cf102f846893800b20cebdf541fc6bbd"
25
+
26
+ [[package]]
27
+ name = "anstyle-parse"
28
+ version = "0.2.7"
29
+ source = "registry+https://github.com/rust-lang/crates.io-index"
30
+ checksum = "4e7644824f0aa2c7b9384579234ef10eb7efb6a0deb83f9630a49594dd9c15c2"
31
+ dependencies = [
32
+ "utf8parse",
33
+ ]
34
+
35
+ [[package]]
36
+ name = "anstyle-query"
37
+ version = "1.1.4"
38
+ source = "registry+https://github.com/rust-lang/crates.io-index"
39
+ checksum = "9e231f6134f61b71076a3eab506c379d4f36122f2af15a9ff04415ea4c3339e2"
40
+ dependencies = [
41
+ "windows-sys",
42
+ ]
43
+
44
+ [[package]]
45
+ name = "anstyle-wincon"
46
+ version = "3.0.10"
47
+ source = "registry+https://github.com/rust-lang/crates.io-index"
48
+ checksum = "3e0633414522a32ffaac8ac6cc8f748e090c5717661fddeea04219e2344f5f2a"
49
+ dependencies = [
50
+ "anstyle",
51
+ "once_cell_polyfill",
52
+ "windows-sys",
53
+ ]
54
+
55
+ [[package]]
56
+ name = "anyhow"
57
+ version = "1.0.99"
58
+ source = "registry+https://github.com/rust-lang/crates.io-index"
59
+ checksum = "b0674a1ddeecb70197781e945de4b3b8ffb61fa939a5597bcf48503737663100"
60
+
61
+ [[package]]
62
+ name = "ariadne"
63
+ version = "0.5.1"
64
+ source = "registry+https://github.com/rust-lang/crates.io-index"
65
+ checksum = "36f5e3dca4e09a6f340a61a0e9c7b61e030c69fc27bf29d73218f7e5e3b7638f"
66
+ dependencies = [
67
+ "unicode-width",
68
+ "yansi",
69
+ ]
70
+
71
+ [[package]]
72
+ name = "autocfg"
73
+ version = "1.5.0"
74
+ source = "registry+https://github.com/rust-lang/crates.io-index"
75
+ checksum = "c08606f8c3cbf4ce6ec8e28fb0014a2c086708fe954eaa885384a6165172e7e8"
76
+
77
+ [[package]]
78
+ name = "clap"
79
+ version = "4.5.46"
80
+ source = "registry+https://github.com/rust-lang/crates.io-index"
81
+ checksum = "2c5e4fcf9c21d2e544ca1ee9d8552de13019a42aa7dbf32747fa7aaf1df76e57"
82
+ dependencies = [
83
+ "clap_builder",
84
+ "clap_derive",
85
+ ]
86
+
87
+ [[package]]
88
+ name = "clap_builder"
89
+ version = "4.5.46"
90
+ source = "registry+https://github.com/rust-lang/crates.io-index"
91
+ checksum = "fecb53a0e6fcfb055f686001bc2e2592fa527efaf38dbe81a6a9563562e57d41"
92
+ dependencies = [
93
+ "anstream",
94
+ "anstyle",
95
+ "clap_lex",
96
+ "strsim",
97
+ ]
98
+
99
+ [[package]]
100
+ name = "clap_derive"
101
+ version = "4.5.45"
102
+ source = "registry+https://github.com/rust-lang/crates.io-index"
103
+ checksum = "14cb31bb0a7d536caef2639baa7fad459e15c3144efefa6dbd1c84562c4739f6"
104
+ dependencies = [
105
+ "heck",
106
+ "proc-macro2",
107
+ "quote",
108
+ "syn",
109
+ ]
110
+
111
+ [[package]]
112
+ name = "clap_lex"
113
+ version = "0.7.5"
114
+ source = "registry+https://github.com/rust-lang/crates.io-index"
115
+ checksum = "b94f61472cee1439c0b966b47e3aca9ae07e45d070759512cd390ea2bebc6675"
116
+
117
+ [[package]]
118
+ name = "colorchoice"
119
+ version = "1.0.4"
120
+ source = "registry+https://github.com/rust-lang/crates.io-index"
121
+ checksum = "b05b61dc5112cbb17e4b6cd61790d9845d13888356391624cbe7e41efeac1e75"
122
+
123
+ [[package]]
124
+ name = "heck"
125
+ version = "0.5.0"
126
+ source = "registry+https://github.com/rust-lang/crates.io-index"
127
+ checksum = "2304e00983f87ffb38b55b444b5e3b60a884b5d30c0fca7d82fe33449bbe55ea"
128
+
129
+ [[package]]
130
+ name = "indoc"
131
+ version = "2.0.6"
132
+ source = "registry+https://github.com/rust-lang/crates.io-index"
133
+ checksum = "f4c7245a08504955605670dbf141fceab975f15ca21570696aebe9d2e71576bd"
134
+
135
+ [[package]]
136
+ name = "is_terminal_polyfill"
137
+ version = "1.70.1"
138
+ source = "registry+https://github.com/rust-lang/crates.io-index"
139
+ checksum = "7943c866cc5cd64cbc25b2e01621d07fa8eb2a1a23160ee81ce38704e97b8ecf"
140
+
141
+ [[package]]
142
+ name = "koatl"
143
+ version = "0.3.0"
144
+ dependencies = [
145
+ "ariadne",
146
+ "koatl-core",
147
+ "once_cell",
148
+ "pyo3",
149
+ ]
150
+
151
+ [[package]]
152
+ name = "koatl-core"
153
+ version = "0.1.0"
154
+ dependencies = [
155
+ "ariadne",
156
+ "clap",
157
+ "koatl-parser",
158
+ "once_cell",
159
+ "slotmap",
160
+ ]
161
+
162
+ [[package]]
163
+ name = "koatl-parser"
164
+ version = "0.1.0"
165
+
166
+ [[package]]
167
+ name = "libc"
168
+ version = "0.2.174"
169
+ source = "registry+https://github.com/rust-lang/crates.io-index"
170
+ checksum = "1171693293099992e19cddea4e8b849964e9846f4acee11b3948bcc337be8776"
171
+
172
+ [[package]]
173
+ name = "memoffset"
174
+ version = "0.9.1"
175
+ source = "registry+https://github.com/rust-lang/crates.io-index"
176
+ checksum = "488016bfae457b036d996092f6cb448677611ce4449e970ceaf42695203f218a"
177
+ dependencies = [
178
+ "autocfg",
179
+ ]
180
+
181
+ [[package]]
182
+ name = "ohtli"
183
+ version = "0.1.0"
184
+ dependencies = [
185
+ "anyhow",
186
+ "clap",
187
+ "koatl-parser",
188
+ ]
189
+
190
+ [[package]]
191
+ name = "once_cell"
192
+ version = "1.21.3"
193
+ source = "registry+https://github.com/rust-lang/crates.io-index"
194
+ checksum = "42f5e15c9953c5e4ccceeb2e7382a716482c34515315f7b03532b8b4e8393d2d"
195
+
196
+ [[package]]
197
+ name = "once_cell_polyfill"
198
+ version = "1.70.1"
199
+ source = "registry+https://github.com/rust-lang/crates.io-index"
200
+ checksum = "a4895175b425cb1f87721b59f0f286c2092bd4af812243672510e1ac53e2e0ad"
201
+
202
+ [[package]]
203
+ name = "portable-atomic"
204
+ version = "1.11.1"
205
+ source = "registry+https://github.com/rust-lang/crates.io-index"
206
+ checksum = "f84267b20a16ea918e43c6a88433c2d54fa145c92a811b5b047ccbe153674483"
207
+
208
+ [[package]]
209
+ name = "proc-macro2"
210
+ version = "1.0.95"
211
+ source = "registry+https://github.com/rust-lang/crates.io-index"
212
+ checksum = "02b3e5e68a3a1a02aad3ec490a98007cbc13c37cbe84a3cd7b8e406d76e7f778"
213
+ dependencies = [
214
+ "unicode-ident",
215
+ ]
216
+
217
+ [[package]]
218
+ name = "profiling"
219
+ version = "0.1.0"
220
+ dependencies = [
221
+ "anyhow",
222
+ "clap",
223
+ "koatl-core",
224
+ "koatl-parser",
225
+ ]
226
+
227
+ [[package]]
228
+ name = "pyo3"
229
+ version = "0.25.1"
230
+ source = "registry+https://github.com/rust-lang/crates.io-index"
231
+ checksum = "8970a78afe0628a3e3430376fc5fd76b6b45c4d43360ffd6cdd40bdde72b682a"
232
+ dependencies = [
233
+ "indoc",
234
+ "libc",
235
+ "memoffset",
236
+ "once_cell",
237
+ "portable-atomic",
238
+ "pyo3-build-config",
239
+ "pyo3-ffi",
240
+ "pyo3-macros",
241
+ "unindent",
242
+ ]
243
+
244
+ [[package]]
245
+ name = "pyo3-build-config"
246
+ version = "0.25.1"
247
+ source = "registry+https://github.com/rust-lang/crates.io-index"
248
+ checksum = "458eb0c55e7ece017adeba38f2248ff3ac615e53660d7c71a238d7d2a01c7598"
249
+ dependencies = [
250
+ "once_cell",
251
+ "target-lexicon",
252
+ ]
253
+
254
+ [[package]]
255
+ name = "pyo3-ffi"
256
+ version = "0.25.1"
257
+ source = "registry+https://github.com/rust-lang/crates.io-index"
258
+ checksum = "7114fe5457c61b276ab77c5055f206295b812608083644a5c5b2640c3102565c"
259
+ dependencies = [
260
+ "libc",
261
+ "pyo3-build-config",
262
+ ]
263
+
264
+ [[package]]
265
+ name = "pyo3-macros"
266
+ version = "0.25.1"
267
+ source = "registry+https://github.com/rust-lang/crates.io-index"
268
+ checksum = "a8725c0a622b374d6cb051d11a0983786448f7785336139c3c94f5aa6bef7e50"
269
+ dependencies = [
270
+ "proc-macro2",
271
+ "pyo3-macros-backend",
272
+ "quote",
273
+ "syn",
274
+ ]
275
+
276
+ [[package]]
277
+ name = "pyo3-macros-backend"
278
+ version = "0.25.1"
279
+ source = "registry+https://github.com/rust-lang/crates.io-index"
280
+ checksum = "4109984c22491085343c05b0dbc54ddc405c3cf7b4374fc533f5c3313a572ccc"
281
+ dependencies = [
282
+ "heck",
283
+ "proc-macro2",
284
+ "pyo3-build-config",
285
+ "quote",
286
+ "syn",
287
+ ]
288
+
289
+ [[package]]
290
+ name = "quote"
291
+ version = "1.0.40"
292
+ source = "registry+https://github.com/rust-lang/crates.io-index"
293
+ checksum = "1885c039570dc00dcb4ff087a89e185fd56bae234ddc7f056a945bf36467248d"
294
+ dependencies = [
295
+ "proc-macro2",
296
+ ]
297
+
298
+ [[package]]
299
+ name = "slotmap"
300
+ version = "1.0.7"
301
+ source = "registry+https://github.com/rust-lang/crates.io-index"
302
+ checksum = "dbff4acf519f630b3a3ddcfaea6c06b42174d9a44bc70c620e9ed1649d58b82a"
303
+ dependencies = [
304
+ "version_check",
305
+ ]
306
+
307
+ [[package]]
308
+ name = "strsim"
309
+ version = "0.11.1"
310
+ source = "registry+https://github.com/rust-lang/crates.io-index"
311
+ checksum = "7da8b5736845d9f2fcb837ea5d9e2628564b3b043a70948a3f0b778838c5fb4f"
312
+
313
+ [[package]]
314
+ name = "syn"
315
+ version = "2.0.104"
316
+ source = "registry+https://github.com/rust-lang/crates.io-index"
317
+ checksum = "17b6f705963418cdb9927482fa304bc562ece2fdd4f616084c50b7023b435a40"
318
+ dependencies = [
319
+ "proc-macro2",
320
+ "quote",
321
+ "unicode-ident",
322
+ ]
323
+
324
+ [[package]]
325
+ name = "target-lexicon"
326
+ version = "0.13.2"
327
+ source = "registry+https://github.com/rust-lang/crates.io-index"
328
+ checksum = "e502f78cdbb8ba4718f566c418c52bc729126ffd16baee5baa718cf25dd5a69a"
329
+
330
+ [[package]]
331
+ name = "unicode-ident"
332
+ version = "1.0.18"
333
+ source = "registry+https://github.com/rust-lang/crates.io-index"
334
+ checksum = "5a5f39404a5da50712a4c1eecf25e90dd62b613502b7e925fd4e4d19b5c96512"
335
+
336
+ [[package]]
337
+ name = "unicode-width"
338
+ version = "0.1.14"
339
+ source = "registry+https://github.com/rust-lang/crates.io-index"
340
+ checksum = "7dd6e30e90baa6f72411720665d41d89b9a3d039dc45b8faea1ddd07f617f6af"
341
+
342
+ [[package]]
343
+ name = "unindent"
344
+ version = "0.2.4"
345
+ source = "registry+https://github.com/rust-lang/crates.io-index"
346
+ checksum = "7264e107f553ccae879d21fbea1d6724ac785e8c3bfc762137959b5802826ef3"
347
+
348
+ [[package]]
349
+ name = "utf8parse"
350
+ version = "0.2.2"
351
+ source = "registry+https://github.com/rust-lang/crates.io-index"
352
+ checksum = "06abde3611657adf66d383f00b093d7faecc7fa57071cce2578660c9f1010821"
353
+
354
+ [[package]]
355
+ name = "version_check"
356
+ version = "0.9.5"
357
+ source = "registry+https://github.com/rust-lang/crates.io-index"
358
+ checksum = "0b928f33d975fc6ad9f86c8f283853ad26bdd5b10b7f1542aa2fa15e2289105a"
359
+
360
+ [[package]]
361
+ name = "windows-link"
362
+ version = "0.1.3"
363
+ source = "registry+https://github.com/rust-lang/crates.io-index"
364
+ checksum = "5e6ad25900d524eaabdbbb96d20b4311e1e7ae1699af4fb28c17ae66c80d798a"
365
+
366
+ [[package]]
367
+ name = "windows-sys"
368
+ version = "0.60.2"
369
+ source = "registry+https://github.com/rust-lang/crates.io-index"
370
+ checksum = "f2f500e4d28234f72040990ec9d39e3a6b950f9f22d3dba18416c35882612bcb"
371
+ dependencies = [
372
+ "windows-targets",
373
+ ]
374
+
375
+ [[package]]
376
+ name = "windows-targets"
377
+ version = "0.53.3"
378
+ source = "registry+https://github.com/rust-lang/crates.io-index"
379
+ checksum = "d5fe6031c4041849d7c496a8ded650796e7b6ecc19df1a431c1a363342e5dc91"
380
+ dependencies = [
381
+ "windows-link",
382
+ "windows_aarch64_gnullvm",
383
+ "windows_aarch64_msvc",
384
+ "windows_i686_gnu",
385
+ "windows_i686_gnullvm",
386
+ "windows_i686_msvc",
387
+ "windows_x86_64_gnu",
388
+ "windows_x86_64_gnullvm",
389
+ "windows_x86_64_msvc",
390
+ ]
391
+
392
+ [[package]]
393
+ name = "windows_aarch64_gnullvm"
394
+ version = "0.53.0"
395
+ source = "registry+https://github.com/rust-lang/crates.io-index"
396
+ checksum = "86b8d5f90ddd19cb4a147a5fa63ca848db3df085e25fee3cc10b39b6eebae764"
397
+
398
+ [[package]]
399
+ name = "windows_aarch64_msvc"
400
+ version = "0.53.0"
401
+ source = "registry+https://github.com/rust-lang/crates.io-index"
402
+ checksum = "c7651a1f62a11b8cbd5e0d42526e55f2c99886c77e007179efff86c2b137e66c"
403
+
404
+ [[package]]
405
+ name = "windows_i686_gnu"
406
+ version = "0.53.0"
407
+ source = "registry+https://github.com/rust-lang/crates.io-index"
408
+ checksum = "c1dc67659d35f387f5f6c479dc4e28f1d4bb90ddd1a5d3da2e5d97b42d6272c3"
409
+
410
+ [[package]]
411
+ name = "windows_i686_gnullvm"
412
+ version = "0.53.0"
413
+ source = "registry+https://github.com/rust-lang/crates.io-index"
414
+ checksum = "9ce6ccbdedbf6d6354471319e781c0dfef054c81fbc7cf83f338a4296c0cae11"
415
+
416
+ [[package]]
417
+ name = "windows_i686_msvc"
418
+ version = "0.53.0"
419
+ source = "registry+https://github.com/rust-lang/crates.io-index"
420
+ checksum = "581fee95406bb13382d2f65cd4a908ca7b1e4c2f1917f143ba16efe98a589b5d"
421
+
422
+ [[package]]
423
+ name = "windows_x86_64_gnu"
424
+ version = "0.53.0"
425
+ source = "registry+https://github.com/rust-lang/crates.io-index"
426
+ checksum = "2e55b5ac9ea33f2fc1716d1742db15574fd6fc8dadc51caab1c16a3d3b4190ba"
427
+
428
+ [[package]]
429
+ name = "windows_x86_64_gnullvm"
430
+ version = "0.53.0"
431
+ source = "registry+https://github.com/rust-lang/crates.io-index"
432
+ checksum = "0a6e035dd0599267ce1ee132e51c27dd29437f63325753051e71dd9e42406c57"
433
+
434
+ [[package]]
435
+ name = "windows_x86_64_msvc"
436
+ version = "0.53.0"
437
+ source = "registry+https://github.com/rust-lang/crates.io-index"
438
+ checksum = "271414315aff87387382ec3d271b52d7ae78726f5d44ac98b4f4030c91880486"
439
+
440
+ [[package]]
441
+ name = "yansi"
442
+ version = "1.0.1"
443
+ source = "registry+https://github.com/rust-lang/crates.io-index"
444
+ checksum = "cfe53a6657fd280eaa890a3bc59152892ffa3e30101319d168b781ed6529b049"
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: koatl
3
- Version: 0.2.3
3
+ Version: 0.3.0
4
4
  Classifier: Programming Language :: Rust
5
5
  Classifier: Programming Language :: Python :: Implementation :: CPython
6
6
  Classifier: Programming Language :: Python :: Implementation :: PyPy
@@ -1,6 +1,6 @@
1
1
  [package]
2
2
  name = "koatl"
3
- version = "0.2.3"
3
+ version = "0.3.0"
4
4
  edition = "2021"
5
5
 
6
6
  [lib]
@@ -17,15 +17,15 @@ export mod = RootModulesProxy()
17
17
 
18
18
  Extension.trait(Iterable)
19
19
 
20
- Extension.property(list, "len")& List.len.fget
20
+ Extension.property(list, "len")! List.len.fget
21
21
 
22
- Extension.property(object, "result")& self => Result(self)
22
+ Extension.property(object, "result")! self => Result(self)
23
23
 
24
- Extension.method(str, "match")& (regex, str) => Pattern(regex).match(str)
24
+ Extension.method(str, "match")! (regex, str) => Pattern(regex).match(str)
25
25
 
26
26
  # Note: the below methods have arguments in reverse order to Python's re module.
27
- Extension.method(str, "matches")& (str, regex) => Pattern(regex).match(str)
28
- Extension.method(str, "search")& (str, regex) => Pattern(regex).search(str)
27
+ Extension.method(str, "matches")! (str, regex) => Pattern(regex).match(str)
28
+ Extension.method(str, "search")! (str, regex) => Pattern(regex).search(str)
29
29
 
30
30
  __tl__.do = koatl.std.alg.do.do
31
31
 
@@ -10,14 +10,14 @@ export Async = class(MonadOnce):
10
10
 
11
11
  __repr__ = self => "Async(...)"
12
12
 
13
- from_generator_fn = staticmethod& (generator_fn, *args, **kwargs) =>
13
+ from_generator_fn = staticmethod! (generator_fn, *args, **kwargs) =>
14
14
  let m = object.__new__(Async)
15
15
  m.generator = generator_fn(*args, **kwargs)
16
16
  return m
17
17
 
18
18
  run = self => asyncio.run((() => await self)())
19
19
 
20
- bind_once = (self, f) => Async.from_generator_fn& () =>
20
+ bind_once = (self, f) => Async.from_generator_fn! () =>
21
21
  let result = f(yield from self.__await__())
22
22
 
23
23
  if not hasattr(result, "__await__"):
@@ -25,7 +25,7 @@ export Async = class(MonadOnce):
25
25
 
26
26
  yield from result.__await__()
27
27
 
28
- bind_gen = (self, gen) => Async.from_generator_fn& () =>
28
+ bind_gen = (self, gen) => Async.from_generator_fn! () =>
29
29
  try:
30
30
  while True:
31
31
  self = gen.send(yield from self.__await__())
@@ -34,17 +34,17 @@ export Async = class(MonadOnce):
34
34
  except StopIteration(value=value) =>
35
35
  return value
36
36
 
37
- pure = staticmethod& x => Async.from_generator_fn& () =>
37
+ pure = staticmethod! x => Async.from_generator_fn! () =>
38
38
  return x
39
39
  yield None
40
40
 
41
- sleep = staticmethod& x => Async(asyncio.sleep(x))
41
+ sleep = staticmethod! x => Async(asyncio.sleep(x))
42
42
 
43
43
  # These execute immediately, so we need to wrap them in a generator
44
44
  # (otherwise, there might not be an event loop running)
45
45
 
46
- gather = staticmethod& (*args) => Async.from_generator_fn& () =>
46
+ gather = staticmethod! (*args) => Async.from_generator_fn! () =>
47
47
  yield from asyncio.gather(*args)
48
48
 
49
- from_sync = staticmethod& (f, *args, **kwargs) => Async.from_generator_fn& () =>
49
+ from_sync = staticmethod! (f, *args, **kwargs) => Async.from_generator_fn! () =>
50
50
  yield from asyncio.get_running_loop().run_in_executor(None, () => f(*args, **kwargs))
@@ -10,9 +10,9 @@ export Monad = class(Trait):
10
10
  """
11
11
  __slots__ = ()
12
12
 
13
- bind = Trait.abstract& (self, f) => None
13
+ bind = Trait.abstract! (self, f) => None
14
14
 
15
- pure = staticmethod& Trait.abstract& value => None
15
+ pure = staticmethod! Trait.abstract! value => None
16
16
 
17
17
  # Automatically generated implementations.
18
18
  map = (self, f) => self.bind(x => self.pure(f(x)))
@@ -35,7 +35,7 @@ export MonadOnce = class(Monad, Trait):
35
35
  __slots__ = ()
36
36
 
37
37
  # The default implementation required for `@` syntax that should be overridden by subclasses.
38
- bind_once = Trait.abstract& (self, f) => None
38
+ bind_once = Trait.abstract! (self, f) => None
39
39
 
40
40
  # An optional, optimized implementation of `bind` that skips deep recursion.
41
41
  # TODO: can this be automatically generated from bind_once?
@@ -61,7 +61,7 @@ export Identity = class(MonadOnce):
61
61
 
62
62
  bind_once = (self, f) => self matches Identity(value) then f(value) else f(self)
63
63
 
64
- pure = staticmethod& x => x
64
+ pure = staticmethod! x => x
65
65
 
66
66
 
67
67
  export Traversable = class(Trait):
@@ -71,4 +71,4 @@ export Traversable = class(Trait):
71
71
  """
72
72
  __slots__ = ()
73
73
 
74
- traverse = Trait.abstract& (self, f) => None
74
+ traverse = Trait.abstract! (self, f) => None
@@ -1,7 +1,7 @@
1
1
  import functools.wraps
2
2
 
3
3
 
4
- export do = f => wraps(f)& (*args, **kwargs) =>
4
+ export do = f => wraps(f)! (*args, **kwargs) =>
5
5
  let gen = f(*args, **kwargs)
6
6
 
7
7
  let m
@@ -18,20 +18,20 @@ export Env = class(MonadOnce):
18
18
 
19
19
  run = (self, ctx) => self.f(ctx)
20
20
 
21
- pure = staticmethod& value => Env(ctx => value)
21
+ pure = staticmethod! value => Env(ctx => value)
22
22
 
23
23
  get = None # to be populated later
24
24
 
25
- item = staticmethod& name => Env(ctx => ctx[name])
25
+ item = staticmethod! name => Env(ctx => ctx[name])
26
26
 
27
- bind_once = (self, f) => Env& ctx =>
27
+ bind_once = (self, f) => Env! ctx =>
28
28
  let v = f(self.f(ctx))
29
29
  if v not matches Env():
30
30
  raise ValueError(f"Expected the binder to return an Env, but got {type(v)}")
31
31
 
32
32
  v.f(ctx)
33
33
 
34
- bind_gen = (self, gen) => Env& ctx =>
34
+ bind_gen = (self, gen) => Env! ctx =>
35
35
  try:
36
36
  while True:
37
37
  self = gen.send(self.f(ctx))
@@ -47,7 +47,7 @@ export Memo = class(MonadOnce):
47
47
 
48
48
  __repr__ = self => f"Memo(...)"
49
49
 
50
- value = staticmethod& (id, deps, f) =>
50
+ value = staticmethod! (id, deps, f) =>
51
51
  """
52
52
  Create a memoized value with the given id and dependencies.
53
53
  f should be a function taking no arguments that returns the value to be memoized.
@@ -73,7 +73,7 @@ export Memo = class(MonadOnce):
73
73
  ctx.update(id, tuple(deps), inner)
74
74
  )
75
75
 
76
- fn = staticmethod& f => wraps(f)& (*args, **kwargs) =>
76
+ fn = staticmethod! f => wraps(f)! (*args, **kwargs) =>
77
77
  let id = f"{f.__module__}.{f.__qualname__}"
78
78
  let deps = (tuple(args), tuple(kwargs.items()))
79
79
  Memo.value(id, deps, () => f(*args, **kwargs))
@@ -83,7 +83,7 @@ export Memo = class(MonadOnce):
83
83
  ctx = Memo.Cache()
84
84
  self.f(ctx)
85
85
 
86
- pure = staticmethod& value => Memo(ctx => value)
86
+ pure = staticmethod! value => Memo(ctx => value)
87
87
 
88
88
  bind_once = (self, f) => Memo(ctx =>
89
89
  let value = f(self.f(ctx))
@@ -119,7 +119,7 @@ export AsyncMemo = class(MonadOnce):
119
119
 
120
120
  __repr__ = self => f"AsyncMemo(...)"
121
121
 
122
- value = staticmethod& (id, deps, f) =>
122
+ value = staticmethod! (id, deps, f) =>
123
123
  """
124
124
  Like Memo.value, but we need to cache the result of the Async.
125
125
  """
@@ -146,7 +146,7 @@ export AsyncMemo = class(MonadOnce):
146
146
  ctx.update(id, tuple(deps), inner)
147
147
  )
148
148
 
149
- fn = staticmethod& f => wraps(f)& (*args, **kwargs) =>
149
+ fn = staticmethod! f => wraps(f)! (*args, **kwargs) =>
150
150
  let id = f"{f.__module__}.{f.__qualname__}"
151
151
  let deps = (tuple(args), tuple(kwargs.items()))
152
152
  AsyncMemo.value(id, deps, () => f(*args, **kwargs))
@@ -158,7 +158,7 @@ export AsyncMemo = class(MonadOnce):
158
158
 
159
159
  with_ctx = (self, ctx) => self.f(ctx)
160
160
 
161
- pure = staticmethod& value => AsyncMemo(ctx => Async.pure(value))
161
+ pure = staticmethod! value => AsyncMemo(ctx => Async.pure(value))
162
162
 
163
163
  bind_once = (self, f) => AsyncMemo(ctx =>
164
164
  let value = f(@self.f(ctx))
@@ -35,7 +35,7 @@ export Result = class(MonadOnce):
35
35
  __init__ = (self, *args, **kwargs) =>
36
36
  raise ValueError("Result should not be instantiated directly, use Ok or Err")
37
37
 
38
- checked = staticmethod& f =>
38
+ checked = staticmethod! f =>
39
39
  """
40
40
  Runs the function in a try block and returns a Result.
41
41
  If the function raises an exception, it will be wrapped in an Err.
@@ -66,7 +66,7 @@ export Result = class(MonadOnce):
66
66
  except StopIteration(value=value) =>
67
67
  return Result(value)
68
68
 
69
- pure = staticmethod& x => Ok(x)
69
+ pure = staticmethod! x => Ok(x)
70
70
 
71
71
  apply = (self, f) =>
72
72
  if not self.ok:
@@ -17,6 +17,6 @@ export List = class(Monad):
17
17
 
18
18
  bind = (self, f) => List(self.flat_map(f))
19
19
 
20
- pure = staticmethod& x => [x]
20
+ pure = staticmethod! x => [x]
21
21
 
22
- len = property& self => len(self)
22
+ len = property! self => len(self)