Skip to content
This repository was archived by the owner on Jan 16, 2021. It is now read-only.

Commit 9ffcdec

Browse files
committed
860 - turns out renaming the arg in keep fixes the problem
What's the right infrastructure to debug this problem? I have no idea.
1 parent 0473fc3 commit 9ffcdec

File tree

4 files changed

+3
-12
lines changed

4 files changed

+3
-12
lines changed

004cell.cc

Lines changed: 1 addition & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -399,12 +399,7 @@ Cell* get(Cell* t, Cell* k) {
399399
os << "{";
400400
for (CellMap::iterator p = t->table.begin(); p != t->table.end(); ++p) {
401401
if (p->second)
402-
if ((Cell*)p->first == newSym(L"$wartScopeBelongsTo")
403-
&& isCons(car(p->second)))
404-
os << car(car(p->second)) << ": ";
405-
else if ((Cell*)p->first == newSym(L"$wartScopeBelongsTo"))
406-
os << car(p->second) << ": ";
407-
else if ((Cell*)p->first == newSym(L"seq"))
402+
if ((Cell*)p->first == newSym(L"seq"))
408403
os << (Cell*)p->first << ":" << p->second << ", ";
409404
else
410405
os << (Cell*)p->first << ", ";

008eval.cc

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -296,7 +296,6 @@ Cell* eval(Cell* expr) {
296296
newCons(calleeEnv(fn), currLexicalScopes.top()));
297297
// now bind its params to args in the new environment
298298
newLexicalScope();
299-
addLexicalBinding(L"$wartScopeBelongsTo", mkref(expr));
300299
bindArgs(sig(fn), evaldArgs);
301300

302301
// eval all forms in body, save result of final form

020.test

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -170,9 +170,6 @@
170170
:valueof (rem no '(1 2 nil 4 nil))
171171
:should be '(1 2 4))
172172

173-
;? (prn:rem (fn(_) dumpScope. prn._ ~odd?._) '(11 12 13))
174-
(prn:keep (fn(_) dumpScope. prn._ odd?._) '(11 12 13))
175-
176173
(test "keep works"
177174
:valueof (keep odd? '(11 12 13))
178175
:should be '(11 13))

020.wart

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -139,8 +139,8 @@ def rem(f seq)
139139
(rem f cdr.seq)
140140
(cons car.seq (rem f cdr.seq))
141141

142-
def keep(f seq)
143-
(rem ~f seq)
142+
def keep(f seq2)
143+
(rem ~f seq2)
144144

145145

146146

0 commit comments

Comments
 (0)