chicken-users
[Top][All Lists]
Advanced

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

Re: Question about how to check a symbol is bound


From: Alaric Snell-Pym
Subject: Re: Question about how to check a symbol is bound
Date: Wed, 28 Jun 2023 15:52:40 +0100
User-agent: Mozilla/5.0 (X11; Linux x86_64; rv:102.0) Gecko/20100101 Thunderbird/102.10.1

On 28/06/2023 14:09, felix.winkelmann@bevuta.com wrote:

(define-object-type bar
    (field-1 name-of-library#foo)
    (field-2 name-of-other-library#some-other-type))

...even though calling symbol-value on those symbols at run time works
just fine. It seems that the symbols imported into the environment at
macro expansion time are handled differently in some way.


I guess during expansion identifiers are renamed to some internal gensym
and thus not accessible by name (which is the whole point of a hygienic
macro system). Could you not register the "foo" type in a expansion time
hash table?

Alas, the requirement is that things like "foo" are part of the lexical environment - so can be imported from modules, renamed, be hidden inside local scopes, all that stuff!


felix


Thanks,

--
Alaric Snell-Pym   (M0KTN neƩ M7KIT)
http://www.snell-pym.org.uk/alaric/

Attachment: OpenPGP_signature
Description: OpenPGP digital signature


reply via email to

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