Skip to content

Commit

Permalink
Fix 1 occurrence of let-to-define
Browse files Browse the repository at this point in the history
Internal definitions are recommended instead of `let` expressions, to reduce nesting.
  • Loading branch information
resyntax-ci[bot] committed Jan 3, 2025
1 parent 7406114 commit 01ea752
Showing 1 changed file with 8 additions and 8 deletions.
16 changes: 8 additions & 8 deletions typed-racket-lib/typed-racket/infer/infer-unit.rkt
Original file line number Diff line number Diff line change
Expand Up @@ -923,14 +923,14 @@
(hash-union
(for/hash ([v (in-list Y)]
#:unless (hash-has-key? S v))
(let ([var (hash-ref idx-hash v variance:const)])
(values v
(match var
[(? variance:const?) (i-subst null)]
[(? variance:co?) (i-subst null)]
[(? variance:contra?) (i-subst/starred null Univ)]
;; TODO figure out if there is a better subst here
[(? variance:inv?) (i-subst null)]))))
(define var (hash-ref idx-hash v variance:const))
(values v
(match var
[(? variance:const?) (i-subst null)]
[(? variance:co?) (i-subst null)]
[(? variance:contra?) (i-subst/starred null Univ)]
;; TODO figure out if there is a better subst here
[(? variance:inv?) (i-subst null)])))
S))
(define (build-subst m)
(match m
Expand Down

0 comments on commit 01ea752

Please sign in to comment.