Some selective #:when (not ...)' -> #:unless ...'.

original commit: 623c7493ed2bbf7c89caea877a7b94a5f4c42c73
This commit is contained in:
Eli Barzilay 2011-09-14 16:53:45 -04:00
parent 2448292eaa
commit 6321082875
4 changed files with 7 additions and 8 deletions

View File

@ -41,8 +41,8 @@
[(env l)
(mk-env e
(for/fold ([h l])
([(k v) (in-dict l)]
#:when (not (f (cons k v))))
([(k v) (in-dict l)]
#:unless (f (cons k v)))
(dict-remove h k)))]))
(r:define/cond-contract (make-empty-env dict)

View File

@ -116,7 +116,7 @@
(log-float-real-missed-opt
this-syntax
(for/list ([x (in-list (syntax->list #'(f1 f2 fs ...)))]
#:when (not (subtypeof? x -Flonum)))
#:unless (subtypeof? x -Flonum))
x)))
;; If an optimization was expected (whether it was safe or not doesn't matter),
;; report subexpressions doing expensive exact arithmetic (Exact-Rational and

View File

@ -177,7 +177,7 @@
[pt (in-list pos-tys)])
(tc-expr/check pa (ret pt)))
(for ([n names]
#:when (not (memq n tnames)))
#:unless (memq n tnames))
(tc-error/delayed
"unknown named argument ~a for class\nlegal named arguments are ~a"
n (stringify tnames)))

View File

@ -163,10 +163,9 @@
(let-values ([(atomic not-atomic) (partition atomic-filter? result)])
(define not-atomic*
(for/list ([p (in-list not-atomic)]
#:when
(not (for/or ([a (in-list atomic)])
(implied-atomic? p a))))
p))
#:unless (for/or ([a (in-list atomic)])
(implied-atomic? p a)))
p))
;; `compact' takes care of implications between atomic props
(apply mk (compact (append not-atomic* atomic) #f)))])
(match (car fs)