This is the mail archive of the mailing list for the Guile project.

Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]

Re: R5RS

> From: Moshe Zadka <>
> As far as I see, guile doesn't have define-syntax. Does it? Is it R5RS?

One of the major changes from R4RS to R5RS was to take the
DEFINE-SYNTAX, LET-SYNTAX, and SYNTAX-RULES out of the Appendix and
make them definitely part of the language definition.  (Another part
of the Appendix, called A Compatible Low-Level Macro Facility, was

As for the situation with Guile, it may depend upon which version of
Guile you have.  We have the following message which indicates that
somebody thinks it should or does work, after importing the right
'module'.  It didn't work for me.  I saved the message, intending to
try again with a newer version, and report it as a bug if the
(USE-SYNTAX (ICE-9 SYNCASE)) thing were still, in fact, needed.  Since
DEFINE-SYNTAX is now part of the standard, I would call it a bug
if you need to say anthing special before it works.  Also note
that SYNTAX-CASE, which seems from the name to be part of the
imported module, is _not_ part of R5RS.  It is more like a refinement
of the discarded part of the appendix.  That is, it is one worthy
approach to implementing the required macro language, and a compatible
extention of it, but not required.

> From: Dirk Herrmann <>
> Subject: Re: need SETQ
> After that, a lot of discussion of the whole topic went on.  One of the
> first posts (by Michael Livshin on January 20th) gave _two_ alternative
> macro implementations of setq for guile.
> I take the freedom to quote his code, which, however, I did not try for
> myself:
> (defmacro setq (var val)
>         <deleted>)
>  -or-
> (use-syntax (ice-9 syncase))
> (define-syntax setq
>   (syntax-rules ()
>     ((setq var val)
>      (let ((tmp val))
>        (set! var tmp)
>        tmp))))

     -- Keith Wright  <>

Programmer in Chief, Free Computer Shop <>
         ---  Food, Shelter, Source code.  ---

Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]