small cleanup

This commit is contained in:
Sam Caldwell 2019-05-30 10:09:34 -04:00
parent ce0c296b5c
commit 3ad0457bd5
1 changed files with 4 additions and 9 deletions

View File

@ -773,12 +773,8 @@
(match (list τ1 τ2) (match (list τ1 τ2)
[(list _ (== )) [(list _ (== ))
#t] #t]
[(list (== Int) (== Int)) [(list (Base t1) (Base t2))
#t] (equal? t1 t2)]
[(list (== String) (== String))
#t]
[(list (== Bool) (== Bool))
#t]
[(list (U τs) _) [(list (U τs) _)
(for/and ([τ (in-list τs)]) (for/and ([τ (in-list τs)])
(<:? τ τ2))] (<:? τ τ2))]
@ -1078,9 +1074,8 @@
;; τ -> String ;; τ -> String
(define (τ->string τ) (define (τ->string τ)
(match τ (match τ
[(== Int) "Int"] [(Base name)
[(== String) "String"] (symbol->string name)]
[(== Bool) "Bool"]
[(== ) ""] [(== ) ""]
[(Observe τ2) [(Observe τ2)
(string-append "?" (τ->string τ2))] (string-append "?" (τ->string τ2))]