[gambit-list] bug in gsc -i ?

Cyrille Duret cduret at gmail.com
Sat May 5 04:44:20 EDT 2012


hello,
I try to build some basic script wich use external macro with -i switch
from gsc and I encounter an annoying error.

Here is the simple test :
@ ll
total 6
-rw-r--r--  1 cydu  cydu  60 May  5 10:36 build.scm
-rw-r--r--  1 cydu  cydu  39 May  5 10:36 test-macro.scm
-rw-r--r--  1 cydu  cydu  55 May  5 10:36 test-simple.scm
@ more test-macro.scm
(define-macro (my-macro x)
  `(+ x 1))
@ more test-simple.scm
(define my-func
  (lambda (x)
    (+ x (my-macro x))))
@ more build.scm
(include "test-macro.scm")
(compile-file "test-simple.scm")
@ gsc-gambit -i build.scm
@ gsi-gambit
Gambit v4.6.4

> (load "test-simple")
*** WARNING -- Variable "my-macro" used in module "test-simple.o1" is
undefined
"/usr/users/cydu/tmp/bug-test/test-simple.o1"
>
*** EOF again to exit
@ rm test-simple.o1
@ gsc-gambit
Gambit v4.6.4

> (include "test-macro.scm")
> (compile-file "test-simple.scm")
"/usr/users/cydu/tmp/bug-test/test-simple.o1"
>
*** EOF again to exit
@ gsi-gambit
Gambit v4.6.4

> (load "test-simple")
"/usr/users/cydu/tmp/bug-test/test-simple.o1"
> (my-func 3)
7
>
It fails from the i switch and succeed when I launch gsc and type the
commands by myself.

It seems that the -i switch from gsc does not load the macro when it
compile my file.
Any idea about what might cause that annoying error ?

thanks a lot
cyrille
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mailman.iro.umontreal.ca/pipermail/gambit-list/attachments/20120505/146422c0/attachment.htm>


More information about the Gambit-list mailing list