syntax-case and modules
Dan <[email protected]>
| Newsgroups | gmane.comp.java.sisc.user |
|---|---|
| Message-ID | <[email protected]> |
It seems that a syntax-case macro cannot use a
function defined in the same module:
(module mod (mac1)
(define (f x) x)
(define-syntax mac1
(lambda (syn)
(syntax-case syn ()
((orig . args)
(with-syntax
((res (datum->syntax-object
(syntax orig)
(apply f (syntax-object->datum
(syntax args))))))
(syntax res))))))
)
#;> (load "tst.scm")
[error message]
Caused by Error: identifier out of context f
Outside a module, these two work.
I want the function to be defined *outside* the body
of the macro so that I can reuse it in another macro
(mac2).
Is this normal?
-- Dan
__________________________________________________
Do You Yahoo!?
Tired of spam? Yahoo! Mail has the best spam protection around
http://mail.yahoo.com
-------------------------------------------------------------------------
Using Tomcat but need to do more? Need to support web services, security?
Get stuff done quickly with pre-integrated technology to make your job easier
Download IBM WebSphere Application Server v.1.0.1 based on Apache Geronimo
http://sel.as-us.falkag.net/sel?cmd=lnk&kid=120709&bid=263057&dat=121642