In the following code, what I'm trying to understand is ...<br><br>why does the namespace seem to treat functions and macros separately? In particular, there does not seem to be anyway for me to access 'bar' in test2 once I (export)<br>
<br>~/magic$ cat test.scm<br>(define (foo x) (list x x))<br>(define-macro (bar x) `(list ,x ,x))<br>~/magic$ cat test2.scm<br>(export)<br>(define (foo x) (list x x))<br>(define-macro (bar x) `(list ,x ,x))<br>~/magic$ bsc<br>
> (import test) <br>> foo<br>#<procedure #2 test#foo><br>> bar<br>*** ERROR IN ##main -- Macro name can't be used as a variable: bar<br>> <br>*** EOF again to exit<br>~/magic$ bsc<br>> (import test2)<br>
> foo<br>*** ERROR IN (console)@2.1 -- Unbound variable: ~#foo<br>1> bar<br>*** ERROR IN (console)@3.1 -- Unbound variable: ~#bar<br>2> test2#foo<br>#<procedure #2 test2#foo><br>2> test2#bar<br>*** ERROR IN (console)@5.1 -- Unbound variable: test2#bar<br>
3> <br>2> <br>1> <br>> <br>*** EOF again to exit<br><br>i realize there are workarounds to this ... but <br>