improve types for numeric predicates
fix pr 9767 svn: r15717
This commit is contained in:
parent
35336e77b8
commit
50b7a0b190
|
@ -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)]
|
||||
|
|
|
@ -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)
|
||||
|
|
Loading…
Reference in New Issue
Block a user