[gambit-list] Xlib.scm and syntax-case.scm

Marc Feeley feeley at iro.umontreal.ca
Thu May 24 01:12:43 EDT 2007


-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1


On 23-May-07, at 10:41 PM, Eduardo Cavazos wrote:

> Hello,
>
> If my ~/gambcini file contains an include for syntax-case, Xlib  
> fails to
> build:
>
> /src/gambc-4.0b22/examples/Xlib-simple$ make Xlib.o1
> rm -f Xlib.o*
> ../../gsc/gsc -:="..
> \/.." -dynamic -cc-options "" -ld-options " -lSM -lICE  -L/usr/ 
> X11R6/lib  -lX11"
> Xlib.scm
> *** ERROR IN map -- invalid syntax ()
> make: *** [Xlib.o1] Error 70
> /src/gambc-4.0b22/examples/Xlib-simple$

At the top of syntax-case.scm you will find this comment:

;  Since the
; syntax-case expander does not know about Gambit's syntactic
; extensions (like DSSSL parameters) some of the syntactic
; extensions cannot be used.  On the other hand, the syntax-case
; expander defines some new special forms, such as "module",
; "alias", and "eval-when".

Basically, when you use syntax-case.scm the portable syntax-case  
system "takes over" and hides all the Gambit specific special forms  
and macros, and you get a system that is very close to Chez Scheme  
(except the set of predefined procedures is different and there are  
slight differences in lexical syntax).

So with syntax-case.scm, you have to limit yourself to R5RS Scheme  
code.  If you want to mix Gambit specific code, I suggest you put  
that code in a separate file, compile it, and "load" it as needed.   
This means that you will have to use define-macro to define macros in  
your Gambit specific code.

Marc

-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.3 (Darwin)

iD8DBQFGVR7M//V9Zc2T/v4RAsCsAKCyGlGS7DXG2fbM2n7VujHL6N4NggCgoBKR
1Jftfi2EU8Pp65k4nWdYELo=
=xZQq
-----END PGP SIGNATURE-----



More information about the Gambit-list mailing list