(require mzlib/sandbox) | package: compatibility-lib |
NOTE: This library is deprecated; use racket/sandbox, instead.
The mzlib/sandbox library mostly re-exports racket/sandbox, but it provides a slightly different make-evaluator function.
The library re-exports the following bindings:
procedure
(make-evaluator language requires input-program ...) → (any/c . -> . any)
language :
(or/c module-path? (one-of/c 'r5rs 'beginner 'beginner-abbr 'intermediate 'intermediate-lambda 'advanced) (list/c (one-of/c 'special) symbol?) (list/c (one-of/c 'special) symbol?) (cons/c (one-of/c 'begin) list?))
requires :
(or/c (cons/c 'begin list?) (listof (or/c module-path? path?))) input-program : any/c (make-evaluator module-decl) → (any/c . -> . any) module-decl : (or/c syntax? pair?)
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.