[plt-scheme] getting list of identifiers exported by a module?
At Sun, 27 Aug 2006 11:46:20 -0400, "Kimberley Burchett" wrote:
> Is there a good way to get the list of identifiers exported by a
> module?
If you have the module source or its compiled form, you can use
`module-compiled-exports' on the compiled `module' expression.
(Expansion of `module' attaches properties with similar information.)
> Also, while I'm on the subject, is there a reason for the distinction
> between module-path and module-path-index? The decision of when to
> require one versus the other seems somewhat arbitrary to me.
I think only `module-provide-exported?' requires a module path index,
and that was probably a mistake.
A function produces a module path index (instead of a module path) when
the path is extracted form expanded or compiled code. In that case, a
relative path like "utils.ss" might be relative to an imported module
instead of the original module (because the imported module re-exported
an identifier, or because it exported a macro that expanded into the
identifier), and a simple path can't represent the information.
Matthew