<p><br>
On Jan 31, 2013 2:35 PM, "Bradley Lucier" <<a href="mailto:lucier@math.purdue.edu">lucier@math.purdue.edu</a>> wrote:<br></p>
<p>> I understand what you're saying, I understand your coding style.<br>
><br>
> What I don't understand is why, if I load the source (*.scm) of the macros into the REPL of gsc, the macros are available to expand the source of later files during compilation, while if I load the compiled (*.o*) versions of the same file into the REPL of gsc, those macros are *not* available to expand the source of later files during compilation.  (I think I gave sufficient examples to illustrate this in my previous e-mail.<br>

></p>
<p>Macros have file scope in compiled code.</p>
<p>I'm not sure on the details, but if I were to guess I'd say that the compiler macro-expands and then compiles, not bothering to write the macro definitions into the compiled module; whereas if you `load' scheme source, it's like you typed each expression singly at the REPL, and those macro definitions become available.</p>

<p>In general, for gambit it's not safe to assume your macro definitions will be visible outside the file they were defined in.</p>