Skip to content

Commit 4734fc3

Browse files
Fix 1 occurrence of let-to-define
Internal definitions are recommended instead of `let` expressions, to reduce nesting.
1 parent 56e65cf commit 4734fc3

File tree

1 file changed

+8
-8
lines changed

1 file changed

+8
-8
lines changed

typed-racket-lib/typed-racket/typed-reader.rkt

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -56,14 +56,14 @@
5656
(syntax-property name prop-name (read-one)))]
5757
;; otherwise error
5858
[else
59-
(let-values ([(l c p) (port-next-location port)])
60-
(raise-read-error (format "typed expression ~a must be followed by :, ::, or @"
61-
(syntax->datum name))
62-
src
63-
l
64-
c
65-
p
66-
1))]))
59+
(define-values (l c p) (port-next-location port))
60+
(raise-read-error (format "typed expression ~a must be followed by :, ::, or @"
61+
(syntax->datum name))
62+
src
63+
l
64+
c
65+
p
66+
1)]))
6767
(skip-whitespace port)
6868
(let ([c (read-char port)])
6969
(unless (equal? #\} c)

0 commit comments

Comments
 (0)