commit 7d53bf6c3056d25d580ca2ce4a023ecac3471f54
parent 2b7ac691ddf21b5818b2ba926f232504bfab5432
Author: Wolfgang Corcoran-Mathe <wcm@sigwinch.xyz>
Date: Mon, 5 Feb 2024 00:32:41 -0500
Environments etc.: Texify.
Diffstat:
1 file changed, 35 insertions(+), 37 deletions(-)
diff --git a/doc/r7rs-small/procedures/environments-and-evaluation.texinfo b/doc/r7rs-small/procedures/environments-and-evaluation.texinfo
@@ -1,78 +1,75 @@
@node Environments and evaluation
@section Environments and evaluation
-@deffn {eval library procedure} environment list1 @dots{}
+@deffn {eval library procedure} environment @vari{list}@dots{}
This procedure returns a specifier for the environment that results by starting with an
empty environment and then importing each
-
-list, considered as an import set, into it. (See section 5.6 for a description of import sets.)
+@var{list}, considered as an import set, into it. (@xref{Libraries} for a description of import sets.)
The bindings of the environment represented by the specifier are immutable, as is the
environment itself.
+
@end deffn
@deffn {r5rs library procedure} scheme-report-environment version
If
-
-version is equal to 5, corresponding to R5RS, scheme-report-environment returns a
-specifier for an environment that contains only the bindings defined in the R5RS library.
+@var{version} is equal to @code{5}, corresponding to @rfivers{}, @code{scheme-report-environment} returns a
+specifier for an environment that contains only the bindings defined in the @rfivers{} library.
Implementations must support this value of
-
-version.
+@var{version}.
Implementations may also support other values of
-
-version, in which case they return a specifier for an environment containing bindings
+@var{version}, in which case they return a specifier for an environment containing bindings
corresponding to the specified version of the report. If
-
-version is neither 5 nor another value supported by the implementation, an error is
+@var{version} is neither @code{5} nor another value supported by the implementation, an error is
signaled.
-The effect of defining or assigning (through the use of eval) an identifier bound in a
-scheme-report-environment (for example car) is unspecified. Thus both the
-environment and the bindings it contains may be immutable.
+The effect of defining or assigning (through the use of @code{eval})
+an identifier bound in a @code{scheme-report-environment} (for example
+@code{car}) is unspecified. Thus both the environment and the bindings
+it contains may be immutable.
+
@end deffn
@deffn {r5rs library procedure} null-environment version
If
-
-version is equal to 5, corresponding to R5RS, the null-environment procedure returns a
+@var{version} is equal to @code{5}, corresponding to @rfivers{}, the null-environment procedure returns a
specifier for an environment that contains only the bindings for all syntactic keywords
-defined in the R5RS library. Implementations must support this value of
-
-version.
+defined in the @rfivers{} library. Implementations must support this value of
+@var{version}.
Implementations may also support other values of
-
-version, in which case they return a specifier for an environment containing appropriate
+@var{version}, in which case they return a specifier for an environment containing appropriate
bindings corresponding to the specified version of the report. If
-
-version is neither 5 nor another value supported by the implementation, an error is
+@var{version} is neither @code{5} nor another value supported by the implementation, an error is
signaled.
-The effect of defining or assigning (through the use of eval) an identifier bound in a
-scheme-report-environment (for example car) is unspecified. Thus both the
-environment and the bindings it contains may be immutable.
+The effect of defining or assigning (through the use of @code{eval})
+an identifier bound in a @code{scheme-report-environment} (for example
+@code{car}) is unspecified. Thus both the environment and the bindings
+it contains may be immutable.
+
@end deffn
@deffn {repl library procedure} interaction-environment
This procedure returns a specifier for a mutable environment that contains an
-implementation-defined set of bindings, typically a superset of those exported by
-(scheme base). The intent is that this procedure will return the environment in which the
-implementation would evaluate expressions entered by the user into a REPL.
+implementation-defined set of bindings, typically a superset of
+those exported by @code{(scheme base)}. The intent is that this procedure
+will return the environment in which the implementation would evaluate
+expressions entered by the user into a REPL.
+
@end deffn
@deffn {eval library procedure} eval expr-or-def environment-specifier
-If
-
-expr-or-def is an expression, it is evaluated in the specified environment and its values are
-returned. If it is a definition, the specified identifier(s) are defined in the specified
-environment, provided the environment is not immutable. Implementations may extend
-eval to allow other objects.
+If @var{expr-or-def} is an expression, it is evaluated in the
+specified environment and its values are returned.
+If it is a definition, the specified identifier(s) are defined in the specified
+environment, provided the environment is not immutable.
+Implementations may extend @code{eval} to allow other objects.
@lisp
(eval '(* 7 3) (environment '(scheme base)))
@@ -84,6 +81,7 @@ eval to allow other objects.
@result{} 20
(eval '(define foo 32)
(environment '(scheme base)))
- @result{} error is signaled
+ @result{} @r{error is signaled}
@end lisp
+
@end deffn