The mzlib/sandbox library mostly re-exports scheme/sandbox, but it provides a slightly different make-evaluator function.
The library re-exports the following bindings:
| |||||||||||||||||||||
| |||||||||||||||||||||
| |||||||||||||||||||||
input-program : any/c | |||||||||||||||||||||
(make-evaluator module-decl) → (any/c . -> . any) | |||||||||||||||||||||
Like make-evaluator or make-module-evaluator, but with several differences:
The language argument can be one of a fixed set of symbols: 'r5rs, etc. They are converted by adding a (list 'special ....) wrapper.
If requires starts with 'begin, then each element in the remainder of the list is effectively evaluated as a prefix to the program. Otherwise, it corresponds to the #:requires argument of make-evaluator.
For each of language and requires that starts with 'begin, the expressions are inspected to find top-level require forms (using symbolic equality to detect require), and the required modules are added to the #:allow list for make-evaluator.