(guile.info.gz) Environments
Info Catalog
(guile.info.gz) provide and require
(guile.info.gz) Modules
(guile.info.gz) The Guile module system
31.2 Environments
=================
Scheme, as defined in R5RS, does _not_ have a full module system.
However it does define the concept of a top-level "environment". Such
an environment maps identifiers (symbols) to Scheme objects such as
procedures and lists: About Closure. In other words, it
implements a set of "bindings".
Environments in R5RS can be passed as the second argument to `eval'
( Fly Evaluation). Three procedures are defined to return
environments: `scheme-report-environment', `null-environment' and
`interaction-environment' ( Fly Evaluation).
In addition, in Guile any module can be used as an R5RS environment,
i.e., passed as the second argument to `eval'.
-- Scheme Procedure: scheme-report-environment version
-- Scheme Procedure: null-environment version
VERSION must be the exact integer `5', corresponding to revision 5
of the Scheme report (the Revised^5 Report on Scheme).
`scheme-report-environment' returns a specifier for an environment
that is empty except for all bindings defined in the report that
are either required or both optional and supported by the
implementation. `null-environment' returns a specifier for an
environment that is empty except for the (syntactic) bindings for
all syntactic keywords defined in the report that are either
required or both optional and supported by the implementation.
Currently Guile does not support values of VERSION for other
revisions of the report.
The effect of assigning (through the use of `eval') a variable
bound in a `scheme-report-environment' (for example `car') is
unspecified. Currently the environments specified by
`scheme-report-environment' are not immutable in Guile.
Info Catalog
(guile.info.gz) provide and require
(guile.info.gz) Modules
(guile.info.gz) The Guile module system
automatically generated byinfo2html