[plt-scheme] get the list of modules in a namespace
On Jul 30, YC wrote:
> Hi -
>
> how can I get a list of the modules in a namespace? I'm trying to
> merge two namespaces, and it seems the easiest way is to use
> `namespace-attach-module`, which requires me to know the list of
> modules that belongs to the source namespace.
>
> It seems that there is something called namespace-registry that
> holds such information, but there doesn't appear to be a way to
> manipulate it.
>
> Is there a way to accomplish the goal?
Seems like there is only `namespace-module-registry', which returns a
value that you can't really use for anything (see the docs). But I
think that to merge two namespaces you'll need to scan the bindings
from each one and create the appropriate bindings in the result, and
`identifier-binding' is what is needed for doing this.
--
((lambda (x) (x x)) (lambda (x) (x x))) Eli Barzilay:
http://www.barzilay.org/ Maze is Life!