The previous sections have described a declarative view of the module system. You can also work with it programmatically by accessing and modifying various parts of the Scheme objects that Guile uses to implement the module system.
At any time, there is a current module. This module is the one
where a top-level
define and similar syntax will add new
bindings. You can find other module objects with
These module objects can be used as the second argument to
Set the current module to module and return the previous current module.
Call thunk within a
dynamic-windsuch that the module that is current at invocation time is restored when thunk's dynamic extent is left (see Dynamic Wind).
More precisely, if thunk escapes non-locally, the current module (at the time of escape) is saved, and the original current module (at the time thunk's dynamic extent was last entered) is restored. If thunk's dynamic extent is re-entered, then the current module is saved, and the previously saved inner module is set current again.
Find the module named name and return it. When it has not already been defined, try to auto-load it. When it can't be found that way either, create an empty module. The name is a list of symbols.
Find the module named name as with
resolve-moduleand return its interface. The interface of a module is also a module object, but it contains only the exported bindings.