Next: , Previous: , Up: Modules   [Contents][Index]


5.12.7 Module Functions

In this section basic module functions are explained. All are defined in rep.structures. Functions related to contruction of modules are described in following sections.

Function: structurep str

Returns t if str is a Lisp structure object.

Function: current-structure

Returns the current structure.

Evaluation of a lisp expression can be done in any module you specify, not only in the current module, with the function eval. (see Evaluation.)

Structure’s name is a symbol.

Function: structure-name str

Returns the name of a structure str.

Function: get-structure name

Returns the structure called name, or nil if no such structure exists.

Function: intern-structure name

Returns the structure called name, or if one doesn’t exist, attempts to load it.

This is a kind of mixture of require and load; the grammar is that of require, but it doesn’t import any.

These functions are related to opening other modules.

Function: structure-imports str
Function: structure-accessible str

Returns the list of modules str has opened or accesses.

There’s a function for bindings.

Function: structure-exports-p str sym

Returns non-nil if the structure structure exports a binding of the symbol sym. More specifically, it returns the symbol local if structure defines it, and returns the symbol external if it exports but does not define it.

Functions open-structures and access-structures are explained in See Using Other Modules.