[gambit-list] bug in gsc -i ?

Cyrille Duret cduret at gmail.com
Mon May 7 09:11:48 EDT 2012


mmm
seems that I will have to use Makefile instead of gsc -i
cyrille

On Monday, May 7, 2012, Bradley Lucier wrote:

> Since no one else has replied yet, the answer is a variant of "it's not a
> bug, it's a feature".
>
> Google
>
> site:http://mercure.iro.umontreal.ca/pipermail/gambit-list/ define-macro
>
> Brad
>
> On May 5, 2012, at 5:44 PM, Cyrille Duret wrote:
>
> > 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
> > _______________________________________________
> > Gambit-list mailing list
> > Gambit-list at iro.umontreal.ca <javascript:;>
> > https://webmail.iro.umontreal.ca/mailman/listinfo/gambit-list
>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://webmail.iro.umontreal.ca/pipermail/gambit-list/attachments/20120507/2b059dcb/attachment.html 


More information about the Gambit-list mailing list