diff --git a/collects/compiler/zo-parse.rkt b/collects/compiler/zo-parse.rkt index 468c27fe21..6c9493537b 100644 --- a/collects/compiler/zo-parse.rkt +++ b/collects/compiler/zo-parse.rkt @@ -307,7 +307,7 @@ [else (error 'zo-parse "bad phase ~a body element: ~e" i sb)])))) ;; unexported: (for/list ([l (in-list phase-data)] - #:when (not (void? (list-ref l 1)))) + #:unless (void? (list-ref l 1))) (let* ([phase (list-ref l 0)] [indirect-syntax ;; could check: (list-ref l 2) should be size of vector: diff --git a/collects/profile/render-text.rkt b/collects/profile/render-text.rkt index 61f21f31d4..a341ed2a90 100644 --- a/collects/profile/render-text.rkt +++ b/collects/profile/render-text.rkt @@ -122,8 +122,8 @@ (define (sub get-edges get-node get-node-time) (for*/list ([edge (in-list (get-edges node))] [sub (in-list (list (get-node edge)))] ; <-- hack... - #:when (not (or (eq? *-node sub) ; <-- ...for this - (memq sub hidden)))) + #:unless (or (eq? *-node sub) ; <-- ...for this + (memq sub hidden))) (define name (node-> 'sub-label sub)) (define local% (format-percent (get-node-time edge) total)) `("" "" "" "" "" "" "" "" diff --git a/collects/racket/vector.rkt b/collects/racket/vector.rkt index e53e8e47e9..c8717a5f7b 100644 --- a/collects/racket/vector.rkt +++ b/collects/racket/vector.rkt @@ -123,7 +123,7 @@ (define (vector-filter-not f v) (one-arg-check f v 'vector-filter-not) - (list->vector (for/list ([i (in-vector v)] #:when (not (f i))) i))) + (list->vector (for/list ([i (in-vector v)] #:unless (f i)) i))) (define (vector-count f v . vs) (unless (and (procedure? f) (procedure-arity-includes? f (add1 (length vs)))) diff --git a/collects/rackunit/docs-complete.rkt b/collects/rackunit/docs-complete.rkt index 97b06fdd05..d712336470 100644 --- a/collects/rackunit/docs-complete.rkt +++ b/collects/rackunit/docs-complete.rkt @@ -74,13 +74,8 @@ (define undocumented-exports (for/list ([ex (in-list exports)] - #:when - (not (xref-binding->definition-tag - xref - (list what ex) - #f)) - #:when - (not (skip-proc ex))) + #:unless (xref-binding->definition-tag xref (list what ex) #f) + #:unless (skip-proc ex)) ex)) (unless (null? undocumented-exports) diff --git a/collects/setup/scribble.rkt b/collects/setup/scribble.rkt index cc76f5be36..256dadb79e 100644 --- a/collects/setup/scribble.rkt +++ b/collects/setup/scribble.rkt @@ -290,7 +290,7 @@ (set-info-need-run?! info #t)))) ;; If any expected dependency changed, then we need a re-run: (for ([i infos] - #:when (not (or (info-need-run? i) (not (info-build? i))))) + #:unless (or (info-need-run? i) (not (info-build? i)))) (let ([ch (ormap (lambda (i2) (or (and (not (info? i2)) i2) diff --git a/collects/syntax/parse/private/rep-data.rkt b/collects/syntax/parse/private/rep-data.rkt index 50cf81f022..b43f38ac74 100644 --- a/collects/syntax/parse/private/rep-data.rkt +++ b/collects/syntax/parse/private/rep-data.rkt @@ -201,7 +201,7 @@ expressions are duplicated, and may be evaluated in different scopes. (for ([id (in-list ids)]) (bound-id-table-set! idbm id #t)) (for/list ([(k v) (in-dict (declenv-table env))] #:when (or (den:class? v) (den:magic-class? v) (den:parser? v)) - #:when (not (bound-id-table-ref idbm k #f))) + #:unless (bound-id-table-ref idbm k #f)) k)) ;; Conventions = (listof (list regexp DeclEntry)) diff --git a/collects/tests/scribble/reader.rkt b/collects/tests/scribble/reader.rkt index bbc4ac3e16..0b5c100649 100644 --- a/collects/tests/scribble/reader.rkt +++ b/collects/tests/scribble/reader.rkt @@ -932,7 +932,7 @@ END-OF-TESTS ;; split the tests [ts (regexp-split #px"(?m:^)-+(?:$|\r?\n)" ts)]) (parameterize ([port-count-lines-enabled #t]) - (for ([t ts] #:when (not (regexp-match? #px"^\\s*$" t))) + (for ([t ts] #:unless (regexp-match? #px"^\\s*$" t)) (let ([m (or (regexp-match #px"^(.*)\n\\s*(-\\S+->)\\s*\n(.*)$" t) (regexp-match #px"^(.*\\S)\\s+(-\\S+->)\\s+(\\S.*)$" diff --git a/collects/tests/unstable/helpers.rkt b/collects/tests/unstable/helpers.rkt index 439e7d302a..3f536562f2 100644 --- a/collects/tests/unstable/helpers.rkt +++ b/collects/tests/unstable/helpers.rkt @@ -67,7 +67,7 @@ [actuals expecteds] ([actual (in-list actual-sorted)] [expected (in-list actual-sorted)] - #:when (not (== actual expected))) + #:unless (== actual expected)) (values actual expected))]) (unless (and (null? actuals) (null? expecteds)) (with-check-info* diff --git a/collects/typed-racket/env/type-env-structs.rkt b/collects/typed-racket/env/type-env-structs.rkt index 30c6b04849..2b346992c2 100644 --- a/collects/typed-racket/env/type-env-structs.rkt +++ b/collects/typed-racket/env/type-env-structs.rkt @@ -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) diff --git a/collects/typed-racket/optimizer/float.rkt b/collects/typed-racket/optimizer/float.rkt index 66022808f3..ed663f7e60 100644 --- a/collects/typed-racket/optimizer/float.rkt +++ b/collects/typed-racket/optimizer/float.rkt @@ -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 diff --git a/collects/typed-racket/typecheck/tc-app.rkt b/collects/typed-racket/typecheck/tc-app.rkt index 7f6744a9c9..b93a451d28 100644 --- a/collects/typed-racket/typecheck/tc-app.rkt +++ b/collects/typed-racket/typecheck/tc-app.rkt @@ -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))) diff --git a/collects/typed-racket/types/filter-ops.rkt b/collects/typed-racket/types/filter-ops.rkt index eaaa9ef0ee..682315a2d3 100644 --- a/collects/typed-racket/types/filter-ops.rkt +++ b/collects/typed-racket/types/filter-ops.rkt @@ -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) diff --git a/collects/unstable/define.rkt b/collects/unstable/define.rkt index 9b2b3f1cf2..b58870fbde 100644 --- a/collects/unstable/define.rkt +++ b/collects/unstable/define.rkt @@ -79,7 +79,7 @@ (syntax-case stx [] [(_ def [name ...] expr) (let* ([ids (syntax->list #'(name ...))]) - (for ([bad (in-list ids)] #:when (not (identifier? bad))) + (for ([bad (in-list ids)] #:unless (identifier? bad)) (wrong-syntax bad "expected an identifier")) (let*-values ([(bound unbound) (partition identifier-binding ids)]) (cond diff --git a/collects/unstable/gui/pict.rkt b/collects/unstable/gui/pict.rkt index 577a9dfd13..058267e5e4 100644 --- a/collects/unstable/gui/pict.rkt +++ b/collects/unstable/gui/pict.rkt @@ -160,7 +160,7 @@ [(_ [name ...] body ...) (let* ([ids (syntax->list #'(name ...))]) - (for ([id (in-list ids)] #:when (not (identifier? id))) + (for ([id (in-list ids)] #:unless (identifier? id)) (raise-syntax-error #f "expected an identifier" stx id)) (with-syntax ([(num ...)