From 19ef14f9b8b73c04acbbfa6bd993908171bc69f7 Mon Sep 17 00:00:00 2001 From: Andy Wingo Date: Fri, 4 Nov 2011 19:37:04 +0100 Subject: [PATCH] defined identifiers scoped in the current module * ice-9/psyntax.scm (chi-top-sequence): Wrap defined identifiers with the current module. Fixes http://savannah.gnu.org/bugs/?31472. --- module/ice-9/psyntax.scm | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/module/ice-9/psyntax.scm b/module/ice-9/psyntax.scm index fc2ccbc79..ae1592639 100644 --- a/module/ice-9/psyntax.scm +++ b/module/ice-9/psyntax.scm @@ -958,8 +958,9 @@ (let* ((r (cons '("placeholder" . (placeholder)) r)) (ribcage (make-empty-ribcage)) (w (make-wrap (wrap-marks w) (cons ribcage (wrap-subst w))))) - (define (record-definition! id label) - (extend-ribcage! ribcage id label)) + (define (record-definition! id var) + (let ((mod (cons 'hygiene (module-name (current-module))))) + (extend-ribcage! ribcage id (wrap var top-wrap mod)))) (define (parse body r w s m esew mod) (let lp ((body body) (exps '())) (if (null? body)