Switch from except' (from
racket/unit') to #:except' in
2htdp/private'.
This is used by the `function-with-arity' macro, and the use of `except' looks like something that is better done with a keyword. I think that this change should be fine since it's a private function.
This commit is contained in:
parent
5aca765989
commit
95679bdab5
|
@ -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
|
||||
|
@ -34,14 +33,14 @@
|
|||
[_ (err tag p msg)])))]))
|
||||
|
||||
(define-syntax function-with-arity
|
||||
(syntax-rules (except)
|
||||
(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 ()
|
||||
|
|
|
@ -57,7 +57,7 @@
|
|||
[on-tick DEFAULT #'#f
|
||||
(function-with-arity
|
||||
1
|
||||
except
|
||||
#:except
|
||||
[(_ f rate)
|
||||
#'(list
|
||||
(proc> 'on-tick (f2h f) 1)
|
||||
|
@ -84,7 +84,7 @@
|
|||
[on-draw to-draw DEFAULT #'#f
|
||||
(function-with-arity
|
||||
1
|
||||
except
|
||||
#:except
|
||||
[(_ f width height)
|
||||
#'(list (proc> 'to-draw (f2h f) 1)
|
||||
(nat> 'to-draw width "width")
|
||||
|
@ -109,7 +109,7 @@
|
|||
[stop-when DEFAULT #'False
|
||||
(function-with-arity
|
||||
1
|
||||
except
|
||||
#:except
|
||||
[(_ stop? last-picture)
|
||||
#'(list (proc> 'stop-when (f2h stop?) 1)
|
||||
(proc> 'stop-when (f2h last-picture) 1))])]
|
||||
|
|
Loading…
Reference in New Issue
Block a user