- (local defines body ...)
is a syntactic form that evaluates body using bindings from
defines.
The defines portion of the expression must be a sequence of
define and define-structure statements. These statements
are evaluated as if they were at the top level, except that the scope
of the bindings is restricted to body.
- (module var
... var
)
body ...) is a syntactic form that evaluates to a
module value. The module exports var
, ...,
and var
with their lexical values at the end of body. A
module value can be accessed via import expressions and can be
distinguished from other values with module?.
Typically, body binds the variables var
, ..., and
var
with internal defines. Other expressions in
body may perform additional computations. It is also possible to
export variables that are defined in the lexical context of a
module expression.
- (import ((exp
bindings)
... ) body ...) evaluates body with values imported
from the modules that are the values of exp
. The
bindings portion of the expresison is a sequence of
binding expressions, where each binding is either an
indentifier import-export-id or pair of identifiers
(import-id export-id). If a binding is
import-export-id, then the identifier is used both to
extract an exported value from a module and as a bound variable in
body. If binding is a pair (import-id
export-id), then export-id is used to extract
an exported value from a module and this value is bound to
import-id in body.
The evaluator first evaluates exp
, ..., all of which must
evaluate to module values. The module values must export all export
variables in the corresponding bindings. The form binds the
import variables to the values of the export variables from the
respective module during the evaluation of body.
- (module? obj) Returns
#t if obj is a module value or #f otherwise.
-
(define-structure (s field
...field
))
is the same as MzScheme's
(define-struct s (field
...field
)),
but structures defined with define-structure are not
compatible with MzScheme's other structure procedures. - (define-schema name
schema) is a syntactic form with no effect. The use of
define-schema is for program documentation.