[plt-scheme] local syntax-case macro does not see earlier macro
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1
Hi,
The following works fine:
==============
$ cat test.scm
(define-syntax foo (syntax-rules () ((_) "It works!")))
(define (f) (let-syntax ((bar (syntax-rules () ((_) (foo)) ) )) (bar) ) )
#;(define (f)
(let-syntax ((bar (lambda (x) (syntax-case x () ((_) (foo)) ) ) )) (bar) ) )
(display (f)) (newline)
==============
$ mzscheme -e '(require scheme)' -f test.scm
It works!
==============
But if you choose to use instead the equivalent commented definition of f, you get:
==============
$ mzscheme -e '(require scheme)' -f test.scm
reference to undefined identifier: foo
=== context ===
test.scm:8:20
==============
Why is this so?
Marijn
- --
If you cannot read my mind, then listen to what I say.
Marijn Schouten (hkBst), Gentoo Lisp project, Gentoo ML
<http://www.gentoo.org/proj/en/lisp/>, #gentoo-{lisp,ml} on FreeNode
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v2.0.11 (GNU/Linux)
Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org
iEYEARECAAYFAkoWwA4ACgkQp/VmCx0OL2wEOwCfek/+uvvsn8l2Ct6HFM6ejpo5
PJMAn26C8YAlcKTpNt3P3hJ8ep2R3Bh1
=PNMn
-----END PGP SIGNATURE-----