Skip to content

Commit 01ea752

Browse files
Fix 1 occurrence of let-to-define
Internal definitions are recommended instead of `let` expressions, to reduce nesting.
1 parent 7406114 commit 01ea752

File tree

1 file changed

+8
-8
lines changed

1 file changed

+8
-8
lines changed

typed-racket-lib/typed-racket/infer/infer-unit.rkt

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -923,14 +923,14 @@
923923
(hash-union
924924
(for/hash ([v (in-list Y)]
925925
#:unless (hash-has-key? S v))
926-
(let ([var (hash-ref idx-hash v variance:const)])
927-
(values v
928-
(match var
929-
[(? variance:const?) (i-subst null)]
930-
[(? variance:co?) (i-subst null)]
931-
[(? variance:contra?) (i-subst/starred null Univ)]
932-
;; TODO figure out if there is a better subst here
933-
[(? variance:inv?) (i-subst null)]))))
926+
(define var (hash-ref idx-hash v variance:const))
927+
(values v
928+
(match var
929+
[(? variance:const?) (i-subst null)]
930+
[(? variance:co?) (i-subst null)]
931+
[(? variance:contra?) (i-subst/starred null Univ)]
932+
;; TODO figure out if there is a better subst here
933+
[(? variance:inv?) (i-subst null)])))
934934
S))
935935
(define (build-subst m)
936936
(match m

0 commit comments

Comments
 (0)