Hi,

I'm trying to check if a given name is bound within some module. It seems (from the documentation) that module objects are considered environments; but this does not work:

scheme@(guile-user)> (defined? 'abc (current-module))

Backtrace:
In unknown file:
   ?: 0* [#<vm b7a8e650> #<program b70ac450 at <unknown port>:1:0 ()>]
   2: 1* [#<program b70ac450 at <unknown port>:1:0 ()>]
   ?: 2* [defined? abc {#<directory (guile-user) 80bb3f0>}]

ERROR: In procedure defined?:
ERROR: Wrong type argument in position 2: #<directory (guile-user) 80bb3f0>

So, what's wrong here and how to do this correctly? (I know that testing for 'abc in current-module is trivial, but say I want to find out about 'abc in (language elisp runtime value-slot) for instance.)

BTW, finally, I want to do this in Tree-IL. But if I manage to do it in Scheme, changing to Tree-IL is trivial.

Thanks a lot,
Daniel



Reply via email to