improve types for numeric predicates

fix pr 9767

svn: r15717
This commit is contained in:
Sam Tobin-Hochstadt 2009-08-12 20:42:20 +00:00
parent 35336e77b8
commit 50b7a0b190
2 changed files with 4 additions and 5 deletions

View File

@ -409,9 +409,9 @@
[exact->inexact (N . -> . N)]
[inexact->exact (N . -> . N)]
[real? (Univ . -> . B)]
[complex? (Univ . -> . B)]
[rational? (Univ . -> . B)]
[real? (Univ . -> . B : (-LFS (list (-filter N)) (list)))]
[complex? (Univ . -> . B : (-LFS (list (-filter N)) (list)))]
[rational? (Univ . -> . B : (-LFS (list (-filter N)) (list)))]
[floor (-> N N)]
[ceiling (-> N N)]
[truncate (-> N N)]

View File

@ -69,8 +69,7 @@
(make lam-result (map list arg-list arg-types) null rest-ty drest
(tc-exprs/check (syntax->list body) ret-ty))))
(when (or (not (= arg-len tys-len))
(and rest (and (not rest-ty)
(not drest))))
(and (or rest-ty drest) (not rest)))
(tc-error/delayed (expected-str tys-len rest-ty drest arg-len rest)))
(cond
[(not rest)