Is it possible to "dynamicly" *include* a file?
For example:
(include (locate-file "file-with-macros.scm"))
or
(let ((f (locate-file "file.scm"))) (include f))
How to handle macros in gambit? The documentation says that macros are only accesible with *include*. This means I cannot mix procedures and macros in a file if I want to use *load* unless I use syntax-case. Is that right?
Out of sheer curiosity, why is syntax-rules/syntax-case handled seperately in gambit?
Afficher les réponses par date
That's called macro expansion or code preprocessor.
2015-05-30 0:27 GMT+05:30 Atticus atticus0@posteo.org:
Is it possible to "dynamicly" *include* a file?
On May 29, 2015, at 2:57 PM, Atticus atticus0@posteo.org wrote:
Is it possible to "dynamicly" *include* a file?
For example:
(include (locate-file "file-with-macros.scm"))
I’d try :
(define-macro (include ref)
(define (resolve ref) …)
`(##include ,(resolve ref)))
Marc
Thanks.
Marc Feeley feeley@iro.umontreal.ca writes:
On May 29, 2015, at 2:57 PM, Atticus atticus0@posteo.org wrote:
Is it possible to "dynamicly" *include* a file?
For example:
(include (locate-file "file-with-macros.scm"))
I’d try :
(define-macro (include ref)
(define (resolve ref) …)
`(##include ,(resolve ref)))
Marc