diff --git a/collects/2htdp/private/clauses-spec-and-process.rkt b/collects/2htdp/private/clauses-spec-and-process.rkt index 0b87a767f9..1f130d718a 100644 --- a/collects/2htdp/private/clauses-spec-and-process.rkt +++ b/collects/2htdp/private/clauses-spec-and-process.rkt @@ -3,7 +3,7 @@ ;; --------------------------------------------------------------------------------------------------- ;; provides functions for specifying the shape of big-bang and universe clauses: -(provide function-with-arity expr-with-check except err) +(provide function-with-arity expr-with-check err) ;; ... and for checking and processing them @@ -15,7 +15,6 @@ (require racket/function racket/list racket/bool - (only-in racket/unit except) ; used only as a keyword...? (for-syntax racket/base syntax/parse) (for-template "clauses-spec-aux.rkt" racket @@ -33,15 +32,15 @@ [(_ x) #`(check> #,tag x)] [_ (err tag p msg)])))])) -(define-syntax function-with-arity - (syntax-rules (except) +(define-syntax function-with-arity + (syntax-rules () [(_ arity) (lambda (tag) (lambda (p) (syntax-case p () [(_ x) #`(proc> #,tag (f2h x) arity)] [_ (err tag p)])))] - [(_ arity except extra ...) + [(_ arity #:except extra ...) (lambda (tag) (lambda (p) (syntax-case p () diff --git a/collects/2htdp/universe.rkt b/collects/2htdp/universe.rkt index da91b81a1b..52d64dfbb8 100644 --- a/collects/2htdp/universe.rkt +++ b/collects/2htdp/universe.rkt @@ -56,15 +56,15 @@ ;; it may specify a clock-tick rate [on-tick DEFAULT #'#f (function-with-arity - 1 - except - [(_ f rate) - #'(list + 1 + #:except + [(_ f rate) + #'(list (proc> 'on-tick (f2h f) 1) (num> 'on-tick rate (lambda (x) (and (real? x) (positive? x))) "positive number" "rate"))] [(_ f rate limit) - #'(list + #'(list (proc> 'on-tick (f2h f) 1) (num> 'on-tick rate (lambda (x) (and (real? x) (positive? x))) "positive number" "rate") @@ -82,11 +82,11 @@ ;; on-draw must specify a rendering function; ;; it may specify dimensions [on-draw to-draw DEFAULT #'#f - (function-with-arity - 1 - except + (function-with-arity + 1 + #:except [(_ f width height) - #'(list (proc> 'to-draw (f2h f) 1) + #'(list (proc> 'to-draw (f2h f) 1) (nat> 'to-draw width "width") (nat> 'to-draw height "height"))])] ;; World Nat Nat MouseEvent -> World @@ -107,9 +107,9 @@ ;; World -> Boolean ;; -- stop-when must specify a predicate; it may specify a rendering function [stop-when DEFAULT #'False - (function-with-arity + (function-with-arity 1 - except + #:except [(_ stop? last-picture) #'(list (proc> 'stop-when (f2h stop?) 1) (proc> 'stop-when (f2h last-picture) 1))])]