From 7695ee44e3ae628e223e76c6ce3d50e71b4fdc37 Mon Sep 17 00:00:00 2001 From: Eli Barzilay Date: Thu, 25 Sep 2008 19:17:50 +0000 Subject: [PATCH] added !eval and documented it svn: r11873 --- collects/handin-server/checker.ss | 3 +++ collects/handin-server/scribblings/checker.scrbl | 9 +++++++-- 2 files changed, 10 insertions(+), 2 deletions(-) diff --git a/collects/handin-server/checker.ss b/collects/handin-server/checker.ss index ee6849132f..e4777f1573 100644 --- a/collects/handin-server/checker.ss +++ b/collects/handin-server/checker.ss @@ -692,6 +692,9 @@ (syntax-rules () [(_ expr) (begin (!defined expr) (!integer* expr))])) +(provide !eval) +(define-syntax-rule (!eval expr) ((submission-eval) `expr)) + (provide !test) (define-syntax !test (syntax-rules () diff --git a/collects/handin-server/scribblings/checker.scrbl b/collects/handin-server/scribblings/checker.scrbl index 6e3e1afb21..ca770bc243 100644 --- a/collects/handin-server/scribblings/checker.scrbl +++ b/collects/handin-server/scribblings/checker.scrbl @@ -213,8 +213,8 @@ Within the body of @scheme[check:], @scheme[users] and @scheme[submission] will be bound to the checker arguments---a (sorted) list of usernames and the submission as a byte string. In addition to the functionality below, you can use -@scheme[((submission-eval) expr)] to evaluate expressions in the -submitted code context, and you can use +@scheme[(!eval _expr)] (or @scheme[((submission-eval) '_expr)]) to +evaluate expressions in the submitted code context, and you can use @scheme[(with-submission-bindings (id ...) body ...)] to evaluate the body when @scheme[id]'s are bound to their values from the submission code.} @@ -354,6 +354,11 @@ code.} @scheme[equal?] forms are @italic{not} evaluated in the submission context.} +@defform[(!eval expr)]{ + + Evaluate an arbitrary expession in the submission context. This is + a simple shorthand for @scheme[((submission-eval) `expr)].} + @defproc*[([(!all-covered) void?] [(!all-covered [proc (string? . -> . any)]) void?])]{