Skip to content

Commit 5d32104

Browse files
committed
printing cleanup
1 parent 2f7d4e5 commit 5d32104

File tree

6 files changed

+2
-18
lines changed

6 files changed

+2
-18
lines changed

.gitignore

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,3 +2,4 @@ biglambda/producers/parser.out
22
biglambda/producers/typetab.py
33
biglambda/producers/__pycache__
44
biglambda/consumers/__pycache__
5+
biglambda/__pycache__

biglambda/__main__.py

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -86,6 +86,5 @@ def explore_frontier(sig, data_type, metric, max_size):
8686
elif not program.csg_check(ex_input, writer):
8787
break
8888
else:
89-
print("Found solution after {} steps".format(i))
9089
print(repr(program))
9190
break

biglambda/consumers/lazy.py

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,6 @@ def __init__(self, generator):
55
self._generator = generator
66
self._history = []
77
def __getitem__(self, key):
8-
print(len(self._history))
98
while key >= len(self._history):
109
self._history.append(next(self._generator))
1110
return self._history[key]

biglambda/producers/e.py

Lines changed: 0 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -121,11 +121,3 @@ def fix_types(node, sub):
121121
else:
122122
kids = [fix_types(c, sub) for c in node.args]
123123
return node._replace(args=tuple(kids))
124-
125-
if __name__ == '__main__':
126-
test = Abs(None, App(Var(1, None), Un(None)))
127-
print(test)
128-
print()
129-
print(reconstruct(linearize(test)))
130-
print()
131-
print(linearize(test))

biglambda/producers/expansion.py

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,3 @@
1-
from pprint import pprint
21
from . import e
32
from . import t
43
from itertools import chain

biglambda/producers/t.py

Lines changed: 1 addition & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,7 @@ class Base(Type):
2222
def __new__(cls, name):
2323
return super().__new__(cls, "base", name, ())
2424
def __repr__(self):
25-
return self.value
25+
return self.value
2626
def __reduce__(self):
2727
return Base, (self.value,)
2828

@@ -135,9 +135,3 @@ def fresh_wrt(expr, s):
135135
base += 1
136136
fresh_vars = [Var(i) for i in fresh_list]
137137
return TypeSubstitution({k : v for k, v in zip(vals, fresh_vars)})
138-
139-
if __name__ == '__main__':
140-
test = Func(List(Pair(Base("int"), Var(1))), Var(1))
141-
print(test)
142-
s = TypeSubstitution({1 : List(Base("str"))})
143-
print(s.visit(test))

0 commit comments

Comments
 (0)