syncraft 0.1.24__tar.gz → 0.1.25__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.
- {syncraft-0.1.24 → syncraft-0.1.25}/PKG-INFO +1 -1
- {syncraft-0.1.24 → syncraft-0.1.25}/pyproject.toml +1 -1
- {syncraft-0.1.24 → syncraft-0.1.25}/syncraft/ast.py +6 -3
- {syncraft-0.1.24 → syncraft-0.1.25}/syncraft.egg-info/PKG-INFO +1 -1
- {syncraft-0.1.24 → syncraft-0.1.25}/LICENSE +0 -0
- {syncraft-0.1.24 → syncraft-0.1.25}/README.md +0 -0
- {syncraft-0.1.24 → syncraft-0.1.25}/setup.cfg +0 -0
- {syncraft-0.1.24 → syncraft-0.1.25}/syncraft/__init__.py +0 -0
- {syncraft-0.1.24 → syncraft-0.1.25}/syncraft/algebra.py +0 -0
- {syncraft-0.1.24 → syncraft-0.1.25}/syncraft/constraint.py +0 -0
- {syncraft-0.1.24 → syncraft-0.1.25}/syncraft/diagnostic.py +0 -0
- {syncraft-0.1.24 → syncraft-0.1.25}/syncraft/finder.py +0 -0
- {syncraft-0.1.24 → syncraft-0.1.25}/syncraft/generator.py +0 -0
- {syncraft-0.1.24 → syncraft-0.1.25}/syncraft/parser.py +0 -0
- {syncraft-0.1.24 → syncraft-0.1.25}/syncraft/py.typed +0 -0
- {syncraft-0.1.24 → syncraft-0.1.25}/syncraft/sqlite3.py +0 -0
- {syncraft-0.1.24 → syncraft-0.1.25}/syncraft/syntax.py +0 -0
- {syncraft-0.1.24 → syncraft-0.1.25}/syncraft.egg-info/SOURCES.txt +0 -0
- {syncraft-0.1.24 → syncraft-0.1.25}/syncraft.egg-info/dependency_links.txt +0 -0
- {syncraft-0.1.24 → syncraft-0.1.25}/syncraft.egg-info/requires.txt +0 -0
- {syncraft-0.1.24 → syncraft-0.1.25}/syncraft.egg-info/top_level.txt +0 -0
- {syncraft-0.1.24 → syncraft-0.1.25}/tests/test_bimap.py +0 -0
- {syncraft-0.1.24 → syncraft-0.1.25}/tests/test_parse.py +0 -0
- {syncraft-0.1.24 → syncraft-0.1.25}/tests/test_until.py +0 -0
|
@@ -182,7 +182,7 @@ class ThenResult(Generic[A, B], StructuralResult):
|
|
|
182
182
|
return tuple(ret)
|
|
183
183
|
return ret, invf
|
|
184
184
|
|
|
185
|
-
def bimap(self, f: Bimap[Any, Any]=Bimap.identity()) -> Tuple[
|
|
185
|
+
def bimap(self, f: Bimap[Any, Any]=Bimap.identity()) -> Tuple[FlatThen, Callable[[FlatThen], ThenResult[A, B]]]:
|
|
186
186
|
match self.kind:
|
|
187
187
|
case ThenKind.LEFT:
|
|
188
188
|
lb, linv = self.left.bimap(f) if isinstance(self.left, StructuralResult) else f(self.left)
|
|
@@ -206,8 +206,11 @@ class ThenResult(Generic[A, B], StructuralResult):
|
|
|
206
206
|
ra = rinv(rraw)
|
|
207
207
|
return replace(self, left=la, right=ra)
|
|
208
208
|
return left_v + right_v, invf
|
|
209
|
-
|
|
210
|
-
|
|
209
|
+
|
|
210
|
+
def bimap_collected(self, f: Bimap[Any, Any]=Bimap.identity()) -> Tuple[MarkedThen, Callable[[MarkedThen], ThenResult[A, B]]]:
|
|
211
|
+
data, invf = self.bimap(f)
|
|
212
|
+
data, func = ThenResult.collect_marked(data)
|
|
213
|
+
return data, lambda d: invf(func(d))
|
|
211
214
|
|
|
212
215
|
|
|
213
216
|
def arity(self)->int:
|
|
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
|