guile-user
[Top][All Lists]
Advanced

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

Re: sc-expand on syntax-case form


From: Julian Graham
Subject: Re: sc-expand on syntax-case form
Date: Fri, 27 Feb 2009 11:42:20 -0500

Okay, I think I've (tentatively) figured this one out:

Instead of `sc-expand', the proper function to use is `syncase'.  (And
you can use `save-module-excursion' if expansion needs to happen with
regard to a particular module environment.)


On Sun, Feb 22, 2009 at 8:13 PM, Julian Graham <address@hidden> wrote:
> Hi Guilers,
>
> Is sc-expand in `(ice-9 syncase)' supposed to be able to expand the
> syntax-case form?  When I try to run it on an expression that includes
> a syntax-case form that looks like:
>
>  (syntax-case foo () ... )
>
> ...I get "invalid syntax ()", presumably because () isn't valid Scheme
> syntax outside of some well-known special forms -- does this style of
> syntax-case need to be added to sc-expand's list of acceptable syntax?
>  PLT's version of the syntax-case expander (`expand') doesn't seem to
> have any trouble with this.  For what it's worth, in Guile:
>
>  (sc-expand '(lambda () (quote ())))
>
> produces
>
>  (lambda () (quote ()))
>
> ...while
>
>  (sc-expand '(let () (quote ())))
>
> produces
>
>  (quote ())
>
> That last one strikes me as a little weird.




reply via email to

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