justinethier/husk-scheme — Issue #53: Other side of Macro Hygiene not respected inside a function
Author: justinethier
Created: 2011-11-09 03:56:03+00:00
State: open

The below test cases fail because var-02 is not actually defined in the env until after the macros are already expanded. So, since the var is not defined in defEnv, the "other side" of hygiene is not respected in this case.

(let ()
(define var-02 1)
(define-syntax test-template
(syntax-rules ()
((_)
var-02)))
(assert/equal (test-template) 1)
(assert/equal (let ((var-02 1)) (test-template)) 1)
(assert/equal (let ((var-02 2)) (test-template)) 1)
(define var-02 3)
(assert/equal (test-template) 3))