[gambit-list] bug in gsc -i ?

Bradley Lucier lucier at math.purdue.edu
Mon May 7 09:33:35 EDT 2012


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




More information about the Gambit-list mailing list