Skip to content

Commit fbfb661

Browse files
Fix 5 occurrences of unless-expression-in-for-loop-to-unless-keyword
Use the `#:unless` keyword instead of `unless` to reduce loop body indentation.
1 parent 07153b7 commit fbfb661

2 files changed

Lines changed: 15 additions & 15 deletions

File tree

drracket-core-lib/drracket/private/insulated-read-language.rkt

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -477,9 +477,9 @@ Will not work with the definitions text surrogate interposition that
477477
(for ([chars (in-list (syntax->list #'(chars ...)))])
478478
(unless (string? (syntax-e chars))
479479
(raise-syntax-error 'chars "expected a string" stx chars))
480-
(for ([char (in-string (syntax-e chars))])
481-
(unless (< (char->integer char) 128)
482-
(raise-syntax-error 'chars "expected only one-byte chars" stx chars))))
480+
(for ([char (in-string (syntax-e chars))]
481+
#:unless (< (char->integer char) 128))
482+
(raise-syntax-error 'chars "expected only one-byte chars" stx chars)))
483483
#'(cond
484484
[(check-chars port chars)
485485
rhs ...]

drracket-core-lib/drracket/private/tool-contract-language.rkt

Lines changed: 12 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -65,13 +65,13 @@
6565
"expected type name specification"
6666
stx
6767
str-stx))
68-
(for ([name (in-list (syntax->list (syntax (name ...))))])
69-
(unless (identifier? name)
70-
(raise-syntax-error 'tool-contract-language.rkt "expected identifier" stx name)))
68+
(for ([name (in-list (syntax->list (syntax (name ...))))]
69+
#:unless (identifier? name))
70+
(raise-syntax-error 'tool-contract-language.rkt "expected identifier" stx name))
7171
(for ([str (in-list (apply append
72-
(map syntax->list (syntax->list (syntax ((strs ...) ...))))))])
73-
(unless (string? (syntax->datum str))
74-
(raise-syntax-error 'tool-contract-language.rkt "expected docs string" stx str))))]))
72+
(map syntax->list (syntax->list (syntax ((strs ...) ...))))))]
73+
#:unless (string? (syntax->datum str)))
74+
(raise-syntax-error 'tool-contract-language.rkt "expected docs string" stx str)))]))
7575

7676
(define-syntax (-#%module-begin2 stx)
7777
(syntax-case stx ()
@@ -118,10 +118,10 @@
118118
"expected type name specification"
119119
stx
120120
str-stx))
121-
(for ([name (in-list (syntax->list (syntax (name ...))))])
122-
(unless (identifier? name)
123-
(raise-syntax-error 'tool-contract-language.rkt "expected identifier" stx name)))
121+
(for ([name (in-list (syntax->list (syntax (name ...))))]
122+
#:unless (identifier? name))
123+
(raise-syntax-error 'tool-contract-language.rkt "expected identifier" stx name))
124124
(for ([str (in-list (apply append
125-
(map syntax->list (syntax->list (syntax ((strs ...) ...))))))])
126-
(unless (string? (syntax->datum str))
127-
(raise-syntax-error 'tool-contract-language.rkt "expected docs string" stx str))))]))
125+
(map syntax->list (syntax->list (syntax ((strs ...) ...))))))]
126+
#:unless (string? (syntax->datum str)))
127+
(raise-syntax-error 'tool-contract-language.rkt "expected docs string" stx str)))]))

0 commit comments

Comments
 (0)