The purpose of this report is to show how changing (if #f '() (begin
...)) into (cond (#f '()) (else ...)) makes the backtracing go crazy.
Regards, Ole
guile> (use-modules (ice-9 streams))
guile> (debug-enable 'backtrace)
(stack 20000 debug backtrace depth 20 maxdepth 1000 frames 3 indent 10 width 79
procnames cheap)
guile> (stream->list (letrec ((loop (lambda (i) (cond (#f '()) (else (and (= i 30)
(throw (quote test) i)) (cons i (delay (loop (+ i 1))))))))) (delay (loop 0))))
Backtrace:
[...]
14 (cond (#f (quote ())) (#t (and (= i 30) (throw # i)) (cons i (delay #))))
15* (and (= i 30) (throw (quote test) i))
16 [throw test 30]
ERROR: In procedure throw in expression (throw (quote test) i):
ERROR: unhandled-exception: test 30
ABORT: (misc-error)
guile> (stream->list (letrec ((loop (lambda (i) (if #f '() (begin (and (= i 30) (throw
(quote test) i)) (cons i (delay (loop (+ i 1))))))))) (delay (loop 0))))
Backtrace:
[...]
14 (if #f (quote ()) (begin (and (= i 30) (throw # i)) (cons i (delay #))))
15
At this point, the current CVS version freeze, whereas earlier versions said
`Exception during displaying of backtrace: signal'
--