guile-user
[Top][All Lists]
Advanced

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

Re: problems with syntax-case and with-syntax


From: Mark H Weaver
Subject: Re: problems with syntax-case and with-syntax
Date: Sun, 27 Aug 2017 21:35:20 -0400
User-agent: Gnus/5.13 (Gnus v5.13) Emacs/25.2 (gnu/linux)

Mark H Weaver <address@hidden> writes:

> The problem is that in Guile 2.2, whenever (define <id> ...) is found in
> the expanded code, where <id> was introduced by a macro (i.e. not passed
> as an explicit argument to the macro), Guile will rewrite the <id> into
> a new name based on the hash of the entire definition form.

I forgot to mention that only top-level definitions are munged in this
way.

Also, my parenthetical definition of what it means to be "introduced by
a macro" lacked precision.  To avoid <id> being "introduced by a macro",
it's not enough for <id> to have been passed an argument to the macro
that generated the definition.  If that were the case, you could work
around this by adding an additional layer of macros, where the upper
layer generated <id> and passed it down to the lower layer which would
generate the definition.

To avoid <id> being considered "introduced by a macro", <id> must
ultimately occur verbatim in the source code outside of any macro
template.

     Mark



reply via email to

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