jeffbz
2008-01-07 18:58:30 UTC
Hi,
I'm getting an error that seems to indicate the compiler can't see my
toplevel function definitions during macroexpansion. I have a function foo,
and a macro M that uses it. I get an error compiling function bar, which
uses M, saying undefined variable "foo". How can I make my definitions
visible during compilation?
Example code that exhibits this issue:
(define (foo x) (+ 1 x))
(define-macro (M y) (foo y))
(define (bar z) (M 3))
output:
first pass of compiler
(compiling foo)
(compiling bar)
(Error while compiling SchemeException: ERROR: undefined variable "foo")
SchemeException: ERROR: undefined variable "foo"
at jsint.E.error(E.java:14)
thank you, and thank you for JScheme, which I am greatly enjoying!!
-Jeff
I'm getting an error that seems to indicate the compiler can't see my
toplevel function definitions during macroexpansion. I have a function foo,
and a macro M that uses it. I get an error compiling function bar, which
uses M, saying undefined variable "foo". How can I make my definitions
visible during compilation?
Example code that exhibits this issue:
(define (foo x) (+ 1 x))
(define-macro (M y) (foo y))
(define (bar z) (M 3))
output:
first pass of compiler
(compiling foo)
(compiling bar)
(Error while compiling SchemeException: ERROR: undefined variable "foo")
SchemeException: ERROR: undefined variable "foo"
at jsint.E.error(E.java:14)
thank you, and thank you for JScheme, which I am greatly enjoying!!
-Jeff
--
View this message in context: http://www.nabble.com/definitions-available-at-compile-time--tp14673314p14673314.html
Sent from the JScheme - User mailing list archive at Nabble.com.
View this message in context: http://www.nabble.com/definitions-available-at-compile-time--tp14673314p14673314.html
Sent from the JScheme - User mailing list archive at Nabble.com.