From 799a9df00662e1ac834ddda317fba7ebef2e0c6b Mon Sep 17 00:00:00 2001 From: Marcell Vazquez-Chanlatte Date: Thu, 30 Nov 2017 17:54:53 -0800 Subject: [PATCH] revert due to bug in lens.Recur for NamedTuple --- stl/ast.py | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/stl/ast.py b/stl/ast.py index 91b818e..b368bba 100644 --- a/stl/ast.py +++ b/stl/ast.py @@ -71,7 +71,7 @@ class AST(object): @property def lineqs(self): - return set(lineq_lens.collect()(self)) + return set(lineq_lens(self).Each().collect()) @property def atomic_predicates(self): @@ -340,7 +340,6 @@ def type_pred(*args): return lambda x: type(x) in ast_types -# lineq_lens = fn.partial(ast_lens, pred=type_pred(LinEq), getter=True) -lineq_lens = lens.Recur(LinEq) +lineq_lens = fn.partial(ast_lens, pred=type_pred(LinEq), getter=True) AP_lens = fn.partial(ast_lens, pred=type_pred(AtomicPred), getter=True) and_or_lens = fn.partial(ast_lens, pred=type_pred(And, Or), getter=True)