Skip to content

Commit e20d4cd

Browse files
committed
simplify code
1 parent 830b72f commit e20d4cd

File tree

2 files changed

+4
-18
lines changed

2 files changed

+4
-18
lines changed

typed-racket-lib/typed-racket/rep/type-rep.rkt

Lines changed: 2 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -160,14 +160,8 @@
160160
(define-match-expander F:*
161161
(lambda (stx)
162162
(syntax-case stx ()
163-
[(_ n)
164-
#'(? F? (app (lambda (t)
165-
(F-n t))
166-
n))]
167-
[(_ n b)
168-
#'(? F? (app (lambda (t)
169-
(list (F-n t) (F-bound t)))
170-
(list n b)))])))
163+
[(_ n) #'(F: n _)]
164+
[(_ n b) #'(F: n b)])))
171165

172166

173167
(define Name-table (make-free-id-table))

typed-racket-lib/typed-racket/types/subtype.rkt

Lines changed: 2 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -806,16 +806,8 @@
806806
(match* (t2 bound)
807807
;; tvars are equal if they are the same variable
808808
[((F: var2) _) (and (eq? var1 var2) A)]
809-
[(_ (? Type?)) (subtype* A bound t2 obj)
810-
#;
811-
(eprintf "t2 is ~a bound is ~a ~n" t2 bound)
812-
#;
813-
(if bound
814-
(let ([ret (subtype* A bound t2 obj)])
815-
(eprintf "subtype ret is ~a ~n" ret)
816-
ret)
817-
(continue<: A t1 t2 obj))]
818-
[(_ _ ) (continue<: A t1 t2 obj)])]
809+
[(_ (? Type?)) (subtype* A bound t2 obj)]
810+
[(_ _) (continue<: A t1 t2 obj)])]
819811
[(case: Fun (Fun: arrows1))
820812
(match* (t2 arrows1)
821813
;; special case when t1 can be collapsed into simpler arrow

0 commit comments

Comments
 (0)