Euscheme displays the current module as part of its prompt, eg.
!>
,
for example (!> xyz)
. If that module is loaded, then the
focus is changed to module xyz
. If the xyz
module is currently not loaded then euscheme tries to open a file called
xyz.em
in the directories in the path stored in the shell
variable EU_MODULE_PATH
. If this is null, then euscheme
only searches the directory in which euscheme was started. For example:
DEBUG> top:
user
to
module xyz
(already loaded) and from there to module
abc
. Unfortunately, module abc
is not
loaded, and EuScheme cannot find a file called abc.em
in
order to load it.
level-0
, for example:
abc
which imports the level-0 EuLisp
language, defines a function f
and exports the binding
f
. It is a requirement that the first part of the name of the
file and the name of the module be identical, eg. abc.em
must be the name of the file containing the above module definition.Thus the syntax for defining a module looks like this:
(defmodule
module-name import-list defn-1 ...
defn-n)
Where the items in italics have the following properties:
(import (
module-1 ...
module-n))
. When this module is loaded,
the imported modules will be loaded first, and in the order given, if not
already loaded.
defun
,
deflocal
, defgeneric
,
defmethod
, defclass
), or an export
expression of the form (export
id-1 ...
id-n)
, where id-i is an identifier
defined in this module or in an imported module.