For Gauche 0.9.5


Next: , Previous: , Up: Library modules - R7RS integration   [Contents][Index]

10.9 scheme.eval - R7RS eval

Module: scheme.eval

Exports bindings of R7RS (scheme eval) library. From R7RS programs, those bindings are available by (import (scheme eval)).

Function: eval expr environment

[R7RS] This is the same as Gauche’s built-in eval (see Eval and repl).

Function: environment import-list …

[R7RS] This is R7RS way to create an environment specifier suitable to pass to eval. In Gauche, an environment specifier is just a module object.

The argument is the same as what r7rs#import takes. This procedure creates an empty environment (as a fresh anonymous module; see make-module in Module introspection, for the details), then imports the bindings as specified by import-lists.

The following example creates an environment that includes scheme.base bindings plus select-module syntax from Gauche.

(environment
 '(scheme base)
 '(only (gauche base) select-module))
 ⇒ #<module #f>  ; an anonymous module

Next: , Previous: , Up: Library modules - R7RS integration   [Contents][Index]