On 6/3/06, Alejandro Forero Cuervo <[EMAIL PROTECTED]> wrote:
Hello. I have chicken egg that exports a "load-extension" function. These extensions are just Scheme files that define certain functions (so my meaning of «extension» in this context does not correspond to the meaning of «chicken egg»). Inside, load-extension uses "(load ...)" to load the file and extract the functions. Basically, my egg exports the symbols it expects the extensions to define; the extensions, as a result of being (load)ed, (define) those symbols; when (load) returns, my egg captures the current values of those symbols in a table (and then it is ready to load more extensions).
To define macros that are available at run-time (which seems to be what you are trying to do), you can put a "(declare (run-time-macros))" in your (compiled) code. This will make all low-level macros defined with define-macro available in code eval'd at run-time. If you need the non-standard syntax-extensions, you can do either: declare run-time-macros and add "(include "chicken-more-macros")", which compiles all macros in (makes your code bigger) or: do a "(eval '(require-extension chicken-more-macros))"), which loads them (the macro-expanders are now eval'd through the interpreter, which is slower, but your compiled executable is smalller. (felix) _______________________________________________ Chicken-users mailing list [email protected] http://lists.nongnu.org/mailman/listinfo/chicken-users
