[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [Chicken-users] combining syntax-rules and er/ir-macro
From: |
Evan Hanson |
Subject: |
Re: [Chicken-users] combining syntax-rules and er/ir-macro |
Date: |
Thu, 30 Jan 2014 15:16:57 +1300 |
Hi Alyn,
On 2014-01-29 18:07, .alyn.post. wrote:
> Why is %map not visible inside enum?
In order to make `%map` available to the enum transformer, it needs to
be defined at expansion time, e.g. (this is one way, there may be others):
(begin-for-syntax
(define-syntax %map
(syntax.rules () ...)))
Also note that because `enum` is an ir transformer, the form provided to
it will already have been renamed, so as it stands it will most likely
define something like "my-foo123" rather than "my-foo" -- you'll
probably have to `inject` those parts of the form in order to have the
correct identifiers bound as a result </possibly unwelcome observation>.
Cheers,
Evan