chicken-users
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Chicken-users] Re: syntax-case macros as extensions?


From: felix winkelmann
Subject: [Chicken-users] Re: syntax-case macros as extensions?
Date: Fri, 9 Mar 2007 10:44:54 +0100

On 3/8/07, Raffael Cavallaro <address@hidden> wrote:

On Mar 8, 2007, at 5:28 AM, felix winkelmann wrote:

>  Then you have to
> make those macros available at _compile-time_, or the
> compiler will not see them. "(require ...)" loads code at run-time,
> not at compile-time. Try "require-for-syntax".

A somewhat related question: I have some macros that are defined with
define-syntax using the syntax-case extension. I can't seem to make
these macros into an extension that is usable at runtime in csi. I
can load the .scm file just fine, and then the macros work in csi,
but If I try to compile these into an extension, when I load it I get
unbound variable errors.


Syntax-case macros can not be compiled.

To create an extension that provides syntax-case macros, just
create the Scheme source file with the macros, perhaps add
a "(require-extension syntax-case)" at the start of it and install
it like this:

(install-extension
 'dotimes
 '("dotimes.scm")
 '((syntax)))  ; use require-at-runtime if the macros need support
code at runtime


cheers,
felix




reply via email to

[Prev in Thread] Current Thread [Next in Thread]