When starts, the top-level is initially set to the user module2. This imports eulisp0, and therefore contains most of the usual lisp functions. Most of the module manipulation functionality is defined in the root module. The only operations defined in the root module are those for loading modules and entering modules (see below). The top-level prompt provides information about which module is the current focus and the history number of the command, for example:
eulisp:0:root!3>
signifies that the top-level is executing on thread 0, the current module focus is root and that the command history index of this line is 3.
eulisp-handler:0:sockets!1>
signifies that the top-level handler is executing on thread 0, the current module focus is sockets and that the command history index of this line is 1. The following operations are defined in the root module:
reload-module
!»
the name of the module.
Reload the specified module. This has the side-effect of resetting the exported bindings of the module, such that any importing module will reference the new values. This operation may be abbreviated to !» which will cause the specified module to be reloaded and change the focus to that module. Unlike reload-module, !» is recognized everywhere.
load-loudlyCompiler A boolean.
Switch on verbosity of monitoring during module loading.
load-quietlyCompiler A boolean.
Switch off verbosity of monitoring during module loading.
loaded-modulesCompiler A list of the names of the currently loaded modules.
(!>
enter-module
If module-name names a module which has been loaded,
then the top-level is changed to be in that module. If a module named
module-name is not currently loaded, then tries to load
the module from a file called module-name.em. If loaded
succesfully, top-level is changed to be in that module. This
operation may be abbreviated to !>. However, it is also
important to note that whilst enter-module is only defined in
root, !> is recognized everywhere.
start-module
Calls the function function-name in the module module-name
with the arguments arg*.
load-module
Load the specified module.
load-pathCompileraccessor
load-pathCompilerupdator
load-path returns a list of strings which define the paths
currently searched when loading modules and accessing documentation.
The setter function permits this load path to be modified dynamically.
In addition, the following features are provided for controlling the
focus of the top-level:
!root
Changes top-level back to the root module.
!exit
Within a handler loop, returns to previous top-level. At top-level, terminates.
!n
Redo the input sequence number n.
!backtrace !b !q Within the handler loop, prints out a backtrace of function calls and their environments. This may be abbreiviated to !b. A simpler backtrace, only containing the function calls, can be printed out by typing !q. The eulisp0 module exports a function, !B (not a special form) which may do a better job in some circumstances, but is more prone to infinite loops.