From b1fbbafd91fdd64496647f0108ece7e6fed9947e Mon Sep 17 00:00:00 2001 From: Vincent St-Amour Date: Thu, 2 Aug 2012 11:31:56 -0400 Subject: [PATCH] Fix type of rational?. --- collects/typed-racket/base-env/base-env-numeric.rkt | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/collects/typed-racket/base-env/base-env-numeric.rkt b/collects/typed-racket/base-env/base-env-numeric.rkt index 5370ed1274..f5dd16fb7f 100644 --- a/collects/typed-racket/base-env/base-env-numeric.rkt +++ b/collects/typed-racket/base-env/base-env-numeric.rkt @@ -703,7 +703,8 @@ [double-flonum? (make-pred-ty -Flonum)] [inexact-real? (make-pred-ty -InexactReal)] [complex? (make-pred-ty N)] -[rational? (make-pred-ty -Real)] +;; `rational?' includes all Reals, except infinities and NaN. +[rational? (asym-pred Univ B (-FS (-filter -Real 0) (-not-filter -Rat 0)))] [exact? (asym-pred N B (-FS -top (-not-filter -Rat 0)))] [inexact? (asym-pred N B (-FS -top (-not-filter (Un -InexactReal -FloatComplex) 0)))] [fixnum? (make-pred-ty -Fixnum)]