[plt-scheme] Listing all exported symbols/structures of a modul e/extension
At Sat, 28 Aug 2004 21:47:12 -0700, Dmitriy Zavin wrote:
> When I try to do that, it lists ALL symbols visible by the namespace:
> (parameterize ((current-namespace (module->namespace '(lib
> "mymodule"))))
> (namespace-mapped-symbols))
>
> What am i missing?
For a module that is implemented as an extension, I get only the
module's definitions/exports:
localhost.localdomain% mzscheme -L mzssl.ss openssl
Welcome to MzScheme version 299.14, Copyright (c) 2004 PLT Scheme, Inc.
> (parameterize ([current-namespace (module->namespace '(lib "mzssl.ss"
"openssl"))]) (namespace-mapped-symbols))
(ssl-close ssl-listen ssl-make-context ssl-connect ssl-accept/enable-break
ssl-make-client-context ssl-load-certificate-chain! ssl-client-context?
ssl-available? ssl-connect/enable-break ssl-load-private-key!
ssl-load-suggested-certificate-authorities! ssl-addresses ssl-accept
ssl-load-verify-root-certificates! ssl-set-verify! ssl-listener?)
I thought that would be the case for SWIG-built modules, too.
For a Scheme-implemented module, it's true that all of the module's
imports are listed (as well as the identifiers that are defined in the
module). In that case, other functions --- such as `identifier-binding'
combined with `namespace-syntax-introduce' --- could be used to
distinguish definitions from imports.
Matthew