17 Oct
2019
17 Oct
'19
12:14
With the current master branch of Gambit, given the files: ==> foo.scm <== (define-macro (hello) '(display "Hello world\n")) ==> foo.sld <== (define-library (foo) (export hello) (import (scheme base) (gambit)) (include "foo.scm")) The following error occurs: $ gsi .
(import (foo)) (hello) *** ERROR IN (stdin)@2.2 -- Unbound variable: foo#hello
Using ##define-macro instead of define-macro has the same effect, as do `gsi -:r7rs .`, using (load "foo.scm") instead of (import (foo)), and using the compiler instead of the interpreter. However, copy/pasting the define-macro form into the REPL works fine. Exporting procedures (instead of macros) works fine. What is the best current practice for exporting macros?