koatl 0.1.28__tar.gz → 0.1.29__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 (119) hide show
  1. {koatl-0.1.28 → koatl-0.1.29}/Cargo.lock +1 -1
  2. {koatl-0.1.28 → koatl-0.1.29}/PKG-INFO +1 -1
  3. {koatl-0.1.28 → koatl-0.1.29}/koatl/Cargo.toml +1 -1
  4. {koatl-0.1.28 → koatl-0.1.29/koatl}/python/koatl/prelude/functional/algebra.tl +1 -0
  5. {koatl-0.1.28 → koatl-0.1.29/koatl}/python/koatl/prelude/functional/list.tl +3 -3
  6. {koatl-0.1.28 → koatl-0.1.29}/koatl-core/parser/src/parser.rs +15 -2
  7. {koatl-0.1.28/koatl → koatl-0.1.29}/python/koatl/prelude/functional/algebra.tl +1 -0
  8. {koatl-0.1.28/koatl → koatl-0.1.29}/python/koatl/prelude/functional/list.tl +3 -3
  9. {koatl-0.1.28 → koatl-0.1.29}/Cargo.toml +0 -0
  10. {koatl-0.1.28 → koatl-0.1.29}/README.md +0 -0
  11. {koatl-0.1.28 → koatl-0.1.29}/koatl/.github/workflows/CI.yml +0 -0
  12. {koatl-0.1.28 → koatl-0.1.29}/koatl/.gitignore +0 -0
  13. {koatl-0.1.28 → koatl-0.1.29}/koatl/LICENSE +0 -0
  14. {koatl-0.1.28 → koatl-0.1.29}/koatl/README.md +0 -0
  15. {koatl-0.1.28 → koatl-0.1.29}/koatl/python/koatl/__init__.py +0 -0
  16. {koatl-0.1.28 → koatl-0.1.29}/koatl/python/koatl/__main__.py +0 -0
  17. {koatl-0.1.28 → koatl-0.1.29}/koatl/python/koatl/cli.py +0 -0
  18. {koatl-0.1.28 → koatl-0.1.29}/koatl/python/koatl/notebook/__init__.py +0 -0
  19. {koatl-0.1.28 → koatl-0.1.29}/koatl/python/koatl/notebook/magic.py +0 -0
  20. {koatl-0.1.28 → koatl-0.1.29}/koatl/python/koatl/prelude/__init__.tl +0 -0
  21. {koatl-0.1.28 → koatl-0.1.29}/koatl/python/koatl/prelude/functional/__init__.tl +0 -0
  22. {koatl-0.1.28 → koatl-0.1.29}/koatl/python/koatl/prelude/functional/async.tl +0 -0
  23. {koatl-0.1.28 → koatl-0.1.29}/koatl/python/koatl/prelude/functional/async_util.py +0 -0
  24. {koatl-0.1.28 → koatl-0.1.29}/koatl/python/koatl/prelude/functional/memo.tl +0 -0
  25. {koatl-0.1.28 → koatl-0.1.29}/koatl/python/koatl/prelude/functional/reader.tl +0 -0
  26. {koatl-0.1.28 → koatl-0.1.29}/koatl/python/koatl/prelude/functional/result.tl +0 -0
  27. {koatl-0.1.28 → koatl-0.1.29}/koatl/python/koatl/prelude/iterable.tl +0 -0
  28. {koatl-0.1.28 → koatl-0.1.29}/koatl/python/koatl/runtime/__init__.py +0 -0
  29. {koatl-0.1.28 → koatl-0.1.29}/koatl/python/koatl/runtime/classes.py +0 -0
  30. {koatl-0.1.28 → koatl-0.1.29}/koatl/python/koatl/runtime/helpers.py +0 -0
  31. {koatl-0.1.28 → koatl-0.1.29}/koatl/python/koatl/runtime/meta_finder.py +0 -0
  32. {koatl-0.1.28 → koatl-0.1.29}/koatl/python/koatl/runtime/record.py +0 -0
  33. {koatl-0.1.28 → koatl-0.1.29}/koatl/python/koatl/runtime/virtual.py +0 -0
  34. {koatl-0.1.28 → koatl-0.1.29}/koatl/requirements.txt +0 -0
  35. {koatl-0.1.28 → koatl-0.1.29}/koatl/src/emit_py.rs +0 -0
  36. {koatl-0.1.28 → koatl-0.1.29}/koatl/src/lib.rs +0 -0
  37. {koatl-0.1.28 → koatl-0.1.29}/koatl/tests/e2e/base/coal.tl +0 -0
  38. {koatl-0.1.28 → koatl-0.1.29}/koatl/tests/e2e/base/containers.tl +0 -0
  39. {koatl-0.1.28 → koatl-0.1.29}/koatl/tests/e2e/base/decorators.tl +0 -0
  40. {koatl-0.1.28 → koatl-0.1.29}/koatl/tests/e2e/base/destructure-for-and-fn.tl +0 -0
  41. {koatl-0.1.28 → koatl-0.1.29}/koatl/tests/e2e/base/destructure.tl +0 -0
  42. {koatl-0.1.28 → koatl-0.1.29}/koatl/tests/e2e/base/escape_ident.tl +0 -0
  43. {koatl-0.1.28 → koatl-0.1.29}/koatl/tests/e2e/base/fstr.tl +0 -0
  44. {koatl-0.1.28 → koatl-0.1.29}/koatl/tests/e2e/base/functions.tl +0 -0
  45. {koatl-0.1.28 → koatl-0.1.29}/koatl/tests/e2e/base/generator.tl +0 -0
  46. {koatl-0.1.28 → koatl-0.1.29}/koatl/tests/e2e/base/if_expr.tl +0 -0
  47. {koatl-0.1.28 → koatl-0.1.29}/koatl/tests/e2e/base/imports.tl +0 -0
  48. {koatl-0.1.28 → koatl-0.1.29}/koatl/tests/e2e/base/loops.tl +0 -0
  49. {koatl-0.1.28 → koatl-0.1.29}/koatl/tests/e2e/base/match.tl +0 -0
  50. {koatl-0.1.28 → koatl-0.1.29}/koatl/tests/e2e/base/nary-list.tl +0 -0
  51. {koatl-0.1.28 → koatl-0.1.29}/koatl/tests/e2e/base/placeholder.tl +0 -0
  52. {koatl-0.1.28 → koatl-0.1.29}/koatl/tests/e2e/base/precedence.tl +0 -0
  53. {koatl-0.1.28 → koatl-0.1.29}/koatl/tests/e2e/base/record.tl +0 -0
  54. {koatl-0.1.28 → koatl-0.1.29}/koatl/tests/e2e/base/scopes.tl +0 -0
  55. {koatl-0.1.28 → koatl-0.1.29}/koatl/tests/e2e/base/semantic_whitespace.tl +0 -0
  56. {koatl-0.1.28 → koatl-0.1.29}/koatl/tests/e2e/base/short_circuit.tl +0 -0
  57. {koatl-0.1.28 → koatl-0.1.29}/koatl/tests/e2e/destructure.tl +0 -0
  58. {koatl-0.1.28 → koatl-0.1.29}/koatl/tests/e2e/prelude/async.tl +0 -0
  59. {koatl-0.1.28 → koatl-0.1.29}/koatl/tests/e2e/prelude/aug_assign.tl +0 -0
  60. {koatl-0.1.28 → koatl-0.1.29}/koatl/tests/e2e/prelude/iterables.tl +0 -0
  61. {koatl-0.1.28 → koatl-0.1.29}/koatl/tests/e2e/prelude/list.tl +0 -0
  62. {koatl-0.1.28 → koatl-0.1.29}/koatl/tests/e2e/prelude/memo.tl +0 -0
  63. {koatl-0.1.28 → koatl-0.1.29}/koatl/tests/e2e/prelude/reader.tl +0 -0
  64. {koatl-0.1.28 → koatl-0.1.29}/koatl/tests/e2e/prelude/result.tl +0 -0
  65. {koatl-0.1.28 → koatl-0.1.29}/koatl/tests/e2e/prelude/slice.tl +0 -0
  66. {koatl-0.1.28 → koatl-0.1.29}/koatl/tests/e2e/prelude/try.tl +0 -0
  67. {koatl-0.1.28 → koatl-0.1.29}/koatl/tests/e2e/prelude/virtual.tl +0 -0
  68. {koatl-0.1.28 → koatl-0.1.29}/koatl/tests/e2e/util/__init__.py +0 -0
  69. {koatl-0.1.28 → koatl-0.1.29}/koatl/tests/e2e/util/module0.tl +0 -0
  70. {koatl-0.1.28 → koatl-0.1.29}/koatl/tests/e2e/util/module1.tl +0 -0
  71. {koatl-0.1.28 → koatl-0.1.29}/koatl/tests/e2e/util/module2.tl +0 -0
  72. {koatl-0.1.28 → koatl-0.1.29}/koatl/tests/parse/arith.tl +0 -0
  73. {koatl-0.1.28 → koatl-0.1.29}/koatl/tests/parse/assign.tl +0 -0
  74. {koatl-0.1.28 → koatl-0.1.29}/koatl/tests/parse/block-comments.tl +0 -0
  75. {koatl-0.1.28 → koatl-0.1.29}/koatl/tests/parse/deco.tl +0 -0
  76. {koatl-0.1.28 → koatl-0.1.29}/koatl/tests/parse/func.tl +0 -0
  77. {koatl-0.1.28 → koatl-0.1.29}/koatl/tests/parse/matches.tl +0 -0
  78. {koatl-0.1.28 → koatl-0.1.29}/koatl/tests/test_e2e.py +0 -0
  79. {koatl-0.1.28 → koatl-0.1.29}/koatl/tests/test_parse.py +0 -0
  80. {koatl-0.1.28 → koatl-0.1.29}/koatl-core/Cargo.toml +0 -0
  81. {koatl-0.1.28 → koatl-0.1.29}/koatl-core/parser/Cargo.toml +0 -0
  82. {koatl-0.1.28 → koatl-0.1.29}/koatl-core/parser/src/ast.rs +0 -0
  83. {koatl-0.1.28 → koatl-0.1.29}/koatl-core/parser/src/lexer.rs +0 -0
  84. {koatl-0.1.28 → koatl-0.1.29}/koatl-core/parser/src/lib.rs +0 -0
  85. {koatl-0.1.28 → koatl-0.1.29}/koatl-core/parser/src/util.rs +0 -0
  86. {koatl-0.1.28 → koatl-0.1.29}/koatl-core/parser/tests/lexer.rs +0 -0
  87. {koatl-0.1.28 → koatl-0.1.29}/koatl-core/src/inference.rs +0 -0
  88. {koatl-0.1.28 → koatl-0.1.29}/koatl-core/src/lib.rs +0 -0
  89. {koatl-0.1.28 → koatl-0.1.29}/koatl-core/src/main.rs +0 -0
  90. {koatl-0.1.28 → koatl-0.1.29}/koatl-core/src/parse_timer.rs +0 -0
  91. {koatl-0.1.28 → koatl-0.1.29}/koatl-core/src/parser.rs +0 -0
  92. {koatl-0.1.28 → koatl-0.1.29}/koatl-core/src/py/ast.rs +0 -0
  93. {koatl-0.1.28 → koatl-0.1.29}/koatl-core/src/py/emit.rs +0 -0
  94. {koatl-0.1.28 → koatl-0.1.29}/koatl-core/src/py/mod.rs +0 -0
  95. {koatl-0.1.28 → koatl-0.1.29}/koatl-core/src/py/util.rs +0 -0
  96. {koatl-0.1.28 → koatl-0.1.29}/koatl-core/src/resolve_scopes.rs +0 -0
  97. {koatl-0.1.28 → koatl-0.1.29}/koatl-core/src/transform.rs +0 -0
  98. {koatl-0.1.28 → koatl-0.1.29}/koatl-core/src/types.rs +0 -0
  99. {koatl-0.1.28 → koatl-0.1.29}/koatl-core/src/util.rs +0 -0
  100. {koatl-0.1.28 → koatl-0.1.29}/pyproject.toml +0 -0
  101. {koatl-0.1.28 → koatl-0.1.29}/python/koatl/__init__.py +0 -0
  102. {koatl-0.1.28 → koatl-0.1.29}/python/koatl/__main__.py +0 -0
  103. {koatl-0.1.28 → koatl-0.1.29}/python/koatl/cli.py +0 -0
  104. {koatl-0.1.28 → koatl-0.1.29}/python/koatl/notebook/__init__.py +0 -0
  105. {koatl-0.1.28 → koatl-0.1.29}/python/koatl/notebook/magic.py +0 -0
  106. {koatl-0.1.28 → koatl-0.1.29}/python/koatl/prelude/__init__.tl +0 -0
  107. {koatl-0.1.28 → koatl-0.1.29}/python/koatl/prelude/functional/__init__.tl +0 -0
  108. {koatl-0.1.28 → koatl-0.1.29}/python/koatl/prelude/functional/async.tl +0 -0
  109. {koatl-0.1.28 → koatl-0.1.29}/python/koatl/prelude/functional/async_util.py +0 -0
  110. {koatl-0.1.28 → koatl-0.1.29}/python/koatl/prelude/functional/memo.tl +0 -0
  111. {koatl-0.1.28 → koatl-0.1.29}/python/koatl/prelude/functional/reader.tl +0 -0
  112. {koatl-0.1.28 → koatl-0.1.29}/python/koatl/prelude/functional/result.tl +0 -0
  113. {koatl-0.1.28 → koatl-0.1.29}/python/koatl/prelude/iterable.tl +0 -0
  114. {koatl-0.1.28 → koatl-0.1.29}/python/koatl/runtime/__init__.py +0 -0
  115. {koatl-0.1.28 → koatl-0.1.29}/python/koatl/runtime/classes.py +0 -0
  116. {koatl-0.1.28 → koatl-0.1.29}/python/koatl/runtime/helpers.py +0 -0
  117. {koatl-0.1.28 → koatl-0.1.29}/python/koatl/runtime/meta_finder.py +0 -0
  118. {koatl-0.1.28 → koatl-0.1.29}/python/koatl/runtime/record.py +0 -0
  119. {koatl-0.1.28 → koatl-0.1.29}/python/koatl/runtime/virtual.py +0 -0
@@ -99,7 +99,7 @@ checksum = "f4c7245a08504955605670dbf141fceab975f15ca21570696aebe9d2e71576bd"
99
99
 
100
100
  [[package]]
101
101
  name = "koatl"
102
- version = "0.1.28"
102
+ version = "0.1.29"
103
103
  dependencies = [
104
104
  "ariadne",
105
105
  "koatl-core",
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: koatl
3
- Version: 0.1.28
3
+ Version: 0.1.29
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.1.28"
3
+ version = "0.1.29"
4
4
  edition = "2021"
5
5
 
6
6
  [lib]
@@ -16,6 +16,7 @@ export Monad = class(Trait):
16
16
  apply = (self, f) => self.bind(x => f.map(fn => fn(x)))
17
17
 
18
18
 
19
+ # TODO: enforce binding only once?
19
20
  export MonadOnce = class(Monad, Trait):
20
21
  """
21
22
  Abstract base class for single-use monads.
@@ -6,9 +6,9 @@ import ..iterable.Iterable
6
6
  export List = class(Monad):
7
7
  bind_once = (self, f) =>
8
8
  raise NotImplementedError(
9
- "Binding List in a do-block doesn't work in Koatl " +
10
- "due to generator limitations. " +
11
- "Wrap in Ok to use the regular Result monad."
9
+ "List may not be bound using @ "
10
+ "due to generator limitations. "
11
+ "Wrap in Ok to use the Result monad."
12
12
  )
13
13
 
14
14
  bind = (self, f) => List(self.flat_map(f))
@@ -795,9 +795,8 @@ where
795
795
  ))
796
796
  .boxed();
797
797
 
798
- let literal = select! {
798
+ let other_literal = select! {
799
799
  Token::Num(s) => Literal::Num(Cow::Borrowed(s)),
800
- Token::Str(s) => Literal::Str(Cow::Owned(s)),
801
800
  Token::Bool(s) => Literal::Bool(s),
802
801
  Token::None => Literal::None
803
802
  }
@@ -805,6 +804,20 @@ where
805
804
  .labelled("literal")
806
805
  .boxed();
807
806
 
807
+ let literal_str = select! {
808
+ Token::Str(s) => s
809
+ }
810
+ .repeated()
811
+ .at_least(1)
812
+ .collect::<Vec<_>>()
813
+ .map_with(|x, e| Literal::Str(Cow::Owned(x.join(""))).spanned(e.span()))
814
+ .labelled("string-literal")
815
+ .boxed();
816
+
817
+ let literal = choice((literal_str, other_literal))
818
+ .labelled("literal")
819
+ .boxed();
820
+
808
821
  let literal_expr = literal
809
822
  .clone()
810
823
  .map(Expr::Literal)
@@ -16,6 +16,7 @@ export Monad = class(Trait):
16
16
  apply = (self, f) => self.bind(x => f.map(fn => fn(x)))
17
17
 
18
18
 
19
+ # TODO: enforce binding only once?
19
20
  export MonadOnce = class(Monad, Trait):
20
21
  """
21
22
  Abstract base class for single-use monads.
@@ -6,9 +6,9 @@ import ..iterable.Iterable
6
6
  export List = class(Monad):
7
7
  bind_once = (self, f) =>
8
8
  raise NotImplementedError(
9
- "Binding List in a do-block doesn't work in Koatl " +
10
- "due to generator limitations. " +
11
- "Wrap in Ok to use the regular Result monad."
9
+ "List may not be bound using @ "
10
+ "due to generator limitations. "
11
+ "Wrap in Ok to use the Result monad."
12
12
  )
13
13
 
14
14
  bind = (self, f) => List(self.flat_map(f))
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes