banning complicated internal defines

Marius Vollmer (mvo@zagadka.ping.de)
06 Nov 1996 18:07:43 +0100

Hi,

I have noticed that one can fool the guile evaluator with things like:

(define (f x)
(if (not x)
(define y 12))
y)

(f #t) => ERROR: unbound variable: y (correct)
(f #f) => 12 (correct)
(f #t) => #t (nonsense)
(f 'blech) => blech

There does not seem to be enough information around in the normal
evaluator to catch such abuses of define and to enforce the R4RS
restrictions about internal defines.

But maybe the debugging version can at least warn about these.

Any comments?