On this page:
make-evaluator

 (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:

sandbox-init-hook
sandbox-reader
sandbox-input
sandbox-output
sandbox-error-output
sandbox-propagate-breaks
sandbox-coverage-enabled
sandbox-namespace-specs
sandbox-override-collection-paths
sandbox-security-guard
sandbox-path-permissions
sandbox-network-guard
sandbox-make-inspector
sandbox-eval-limits
kill-evaluator
break-evaluator
set-eval-limits
put-input
get-output
get-error-output
get-uncovered-expressions
call-with-limits
with-limits
exn:fail:resource?
exn:fail:resource-resource

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?)
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.