Cyril Brulebois <k...@debian.org> (31/12/2008):
> Filippo Giunchedi <fili...@debian.org> (28/11/2008):
> > FWIW the failing test seems to be test-cont in test-suite/tests/r4rs.test,
> > so the bug might be in either leaf-eq? or next-leaf-generator
> 
> Thanks for the hint,
> 
> I'll try and have a look into it.

Thanks to Martin, got the B-D installed. With the attached diff, I'm
getting:
| Running r4rs.test
| ERROR: Unbound variable: bar

so leaf-eq? seems the buggy one. Still need to go deeper, but I thought
I'd let the bug log know. I've also noticed there were other “bar”
occurrences in the file, so I've replaced it with “fooish”, but that
still breaks in the same way. And if there are other folks who want to
play with it, once the build failed, the tests can be run using “make
check-TESTS”.

Happy everything.

Mraw,
KiBi.
--- a/test-suite/tests/r4rs.test
+++ b/test-suite/tests/r4rs.test
@@ -874,11 +874,11 @@
 ;;; r...@copper.ucs.indiana.edu (Raja Sooriamurthi) for fixing this
 ;;; code.  The function leaf-eq? compares the leaves of 2 arbitrary
 ;;; trees constructed of conses.  
-(define (next-leaf-generator obj eot)
+(define (next-leaf-generator obj baz)
   (letrec ((return #f)
 	   (cont (lambda (x)
 		   (recur obj)
-		   (set! cont (lambda (x) (return eot)))
+		   (set! cont (lambda (x) (return baz)))
 		   (cont #f)))
 	   (recur (lambda (obj)
 		      (if (pair? obj)
@@ -890,12 +890,12 @@
     (lambda () (call-with-current-continuation
 		(lambda (ret) (set! return ret) (cont #f))))))
 (define (leaf-eq? x y)
-  (let* ((eot (list 'eot))
-	 (xf (next-leaf-generator x eot))
-	 (yf (next-leaf-generator y eot)))
+  (let* ((bar (list 'bar))
+	 (xf (next-leaf-generator x bar))
+	 (yf (next-leaf-generator y bar)))
     (letrec ((loop (lambda (x y)
 		     (cond ((not (eq? x y)) #f)
-			   ((eq? eot x) #t)
+			   ((eq? bar x) #t)
 			   (else (loop (xf) (yf)))))))
       (loop (xf) (yf)))))
 (define (test-cont)

Attachment: signature.asc
Description: Digital signature

Reply via email to