|
From: | Xin Wang |
Subject: | Re: [Chicken-users] About define-syntax and expansion environment |
Date: | Fri, 14 Jun 2013 23:38:49 +0800 |
On Fri, Jun 14, 2013 at 10:30:28PM +0800, Xin Wang wrote:That's correct; this problem is known as "phasing"; macros are defined in
> Hi,
>
> I encountered a problem that previously defined macro can not be used
> inside other macro defination.
>
> It seems that newly defined syntax does not available in macro expansion
> environment, is it intended?
their own compilation phase. Each phase can only see macros defined in
earlier phases.
To define a macro for the macro environment, you can wrap it in a
begin-for-syntax block, or put it inside its own module and then
use import-for-syntax to import it in the module that uses it.
Cheers,
Peter
--
http://www.more-magic.net
[Prev in Thread] | Current Thread | [Next in Thread] |