Under Standard macro hiding, this expands out up to:
(module anonymous-module racket
(#%module-begin
(define-syntax myor (syntax-rules () [(_ e) e] [(_ e1 . es) (let ([r e1]) (if r r (myor . es)))]))
(define (nonzero? r) (let ([r (negative? r)]) (if r r (myor (positive? r)))))))
where the second 'myor' still exists there.
There may be a relationship with the syntax tainting mechanisms that syntax-rules enforces. When the module is written using syntax-case rather than syntax-rules, then the macro expands out as expected.
Release:
5.2.0.901
Environment:
Linux i686 / Mozilla/5.0 (X11; Linux i686) AppleWebKit/534.30 (KHTML, like Gecko)
Chrome/12.0.742.124 Safari/534.30
Originally submitted by Danny Yoo on: Sun Jan 22 22:08:01 -0500 2012
The following program, when macro expanded using standard Macro hiding, does not fully expand out uses of the user-defined macro:
Under Standard macro hiding, this expands out up to:
where the second 'myor' still exists there.
There may be a relationship with the syntax tainting mechanisms that syntax-rules enforces. When the module is written using syntax-case rather than syntax-rules, then the macro expands out as expected.
Release:
Environment:
This bug was converted from Gnats bug 12508.
[anon-submit; dyoo at hashcollision dot org]