On this page:
Version: 4.2.1

16.4 Interactive Module Loading

The bindings documented in this section are provided by the scheme/enter and scheme/init libraries, which means that they are available when mzscheme is started with no command-line arguments. They are not provided by scheme/base or scheme.

(enter! module-path)
(enter! #f)
Intended for use in a REPL, such as when mzscheme is started in interactive mode. When a module-path is provided (in the same sense as for require), the corresponding module is loaded or invoked, and the current namespace is changed to the body of the module via module->namespace. When #f is provided, then the current namespace is restored to the original one.

If invoking module-path requires loading any files, then modification dates of the files are recorded. If the file is modified, then a later enter! re-loads the module from source; see also Module Re-declarations. Similarly if a later enter! transitively requires a modified module, then the required module is re-loaded. Re-loading support works only for modules that are first loaded (either directly or indirectly through transitive requires) via enter!.

After switching namespaces to the designated module, enter! automatically requires scheme/enter into the namespace, so that enter! can be used to switch namespaces again.

When it loads or re-loads a module from a file, enter! prints a message to (current-error-port).