Skip to content

Commit 16a98c9

Browse files
Fix 2 occurrences of inline-unnecessary-define
This variable is returned immediately and can be inlined.
1 parent 09d9e92 commit 16a98c9

File tree

2 files changed

+17
-21
lines changed
  • typed-racket-lib/typed-racket/static-contracts/combinators
  • typed-racket-test

2 files changed

+17
-21
lines changed

typed-racket-lib/typed-racket/static-contracts/combinators/exist.rkt

Lines changed: 4 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -29,12 +29,10 @@
2929
(define (sc->contract v f)
3030
(match-define (exist-combinator (list names doms rngs)) v)
3131
(parameterize ([static-contract-may-contain-free-ids? #t])
32-
(define a
33-
(with-syntax ([doms-stx (f doms)]
34-
[rngs-stx (f rngs)]
35-
[n (car names)])
36-
#'(->i ([n doms-stx]) (_ (n) rngs-stx))))
37-
a))
32+
(with-syntax ([doms-stx (f doms)]
33+
[rngs-stx (f rngs)]
34+
[n (car names)])
35+
#'(->i ([n doms-stx]) (_ (n) rngs-stx)))))
3836
(define (sc->constraints v f)
3937
(simple-contract-restrict 'flat))])
4038

typed-racket-test/main.rkt

Lines changed: 13 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -59,21 +59,19 @@
5959
(not (set-member? excl (path->string (file-name-from-path p*))))))
6060

6161
(define-values [p*-base p*-name _] (split-path p*))
62-
(define prm (list p*-base p*-name
63-
(if (places)
64-
(delay/thread
65-
(begin0 (run-in-other-place p* error?)
66-
(when (zero? (modulo i 10))
67-
(eprintf "."))))
68-
(delay
69-
(parameterize ([read-accept-reader #t]
70-
[current-load-relative-directory p*-base]
71-
[current-directory p*-base]
72-
[current-output-port (open-output-nowhere)])
73-
(begin0 (dr p*-name)
74-
(when (zero? (modulo i 10))
75-
(eprintf "."))))))))
76-
prm))
62+
(list p*-base
63+
p*-name
64+
(if (places)
65+
(delay/thread (begin0 (run-in-other-place p* error?)
66+
(when (zero? (modulo i 10))
67+
(eprintf "."))))
68+
(delay (parameterize ([read-accept-reader #t]
69+
[current-load-relative-directory p*-base]
70+
[current-directory p*-base]
71+
[current-output-port (open-output-nowhere)])
72+
(begin0 (dr p*-name)
73+
(when (zero? (modulo i 10))
74+
(eprintf ".")))))))))
7775
(define tests
7876
(for/list ([e prms])
7977
(match-define (list path p prm) e)

0 commit comments

Comments
 (0)