[gambit-list] bug in gsc -i ?

Cyrille Duret cduret at gmail.com
Mon May 7 11:20:54 EDT 2012


In fact I want to use the prelude option of the compiler inside the
interpreted mode.
I have not seen any prelude: option in the compile-file function.

The command line I use actually in my Makefile
gsc-gambit -prelude '(include "test-macro.scm")' test-simple.scm

 thanks

On Mon, May 7, 2012 at 3:33 PM, Bradley Lucier <lucier at math.purdue.edu>wrote:

>
> On May 7, 2012, at 10:11 PM, Cyrille Duret wrote:
>
> > mmm
> > seems that I will have to use Makefile instead of gsc -i
> > cyrille
>
> You came to that conclusion from reading the mail list archives?
>
> The following works:
>
> First, give the correct definition of my-macro:
>
> [Bradley-Luciers-MacBook-Pro:~/crap] lucier% cat test-macro.scm
> (define-macro (my-macro x) `(+ ,x 1))
>
> Then, include the macro definitions in the file you want to compile:
>
> [Bradley-Luciers-MacBook-Pro:~/crap] lucier% cat test-simple.scm
> (include "test-macro.scm")
> (define my-func (lambda (x) (+ x (my-macro x))))
>
> Then the following works just fine:
>
> [Bradley-Luciers-MacBook-Pro:~/crap] lucier% cat build.scm
> (compile-file "test-simple.scm")
> [Bradley-Luciers-MacBook-Pro:~/crap] lucier% gsc -i build.scm
> [Bradley-Luciers-MacBook-Pro:~/crap] lucier% gsi
> Gambit v4.6.5
>
> > (load "test-simple")
> "/Users/lucier/crap/test-simple.o1"
> > (my-func 2)
> 5
>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mailman.iro.umontreal.ca/pipermail/gambit-list/attachments/20120507/f14afe37/attachment.htm>


More information about the Gambit-list mailing list