From c547da857ed46c11bdb35474ef02cea37d4daa60 Mon Sep 17 00:00:00 2001 From: Vincent St-Amour Date: Mon, 11 Oct 2010 18:19:15 -0400 Subject: [PATCH] Added the Float-Complex type for consistency with the new float types. Inexact-Complex has been kept as a synonym for backward compatibility. original commit: 52bd739d00491d2a78b62c6d6e89fb5eaf6ae046 --- collects/typed-scheme/private/base-types.rkt | 3 ++- collects/typed-scheme/scribblings/optimization.scrbl | 6 +++--- collects/typed-scheme/scribblings/ts-reference.scrbl | 2 +- 3 files changed, 6 insertions(+), 5 deletions(-) diff --git a/collects/typed-scheme/private/base-types.rkt b/collects/typed-scheme/private/base-types.rkt index c2967cfb..f7818966 100644 --- a/collects/typed-scheme/private/base-types.rkt +++ b/collects/typed-scheme/private/base-types.rkt @@ -1,7 +1,8 @@ #lang s-exp "type-env-lang.rkt" [Complex -Number] -[Inexact-Complex -InexactComplex] +[Float-Complex -InexactComplex] ; for consistency with float vs inexact-real +[Inexact-Complex -InexactComplex] ; for backward compatiblity [Number -Number] [Integer -Integer] [Real -Real] diff --git a/collects/typed-scheme/scribblings/optimization.scrbl b/collects/typed-scheme/scribblings/optimization.scrbl index ac4f18ca..dbe65aa7 100644 --- a/collects/typed-scheme/scribblings/optimization.scrbl +++ b/collects/typed-scheme/scribblings/optimization.scrbl @@ -68,7 +68,7 @@ not necessary when using @racket[+] or @racket[-]. When mixing floating-point numbers of different precisions, results use the highest precision possible. -On a similar note, the @racket[Inexact-Complex] type is preferable to +On a similar note, the @racket[Float-Complex] type is preferable to the @racket[Complex] type for the same reason. Typed Racket can keep @tech[#:doc '(lib "scribblings/reference/reference.scrbl") #:key "inexact numbers"]{inexact} @@ -93,8 +93,8 @@ present and @tech[#:doc '(lib "scribblings/reference/reference.scrbl") #:key "inexact numbers"]{inexact} for the literal to be of type -@racket[Inexact-Complex]; @racket[0.0+1.0i] is of type -@racket[Inexact-Complex] but @racket[+1.0i] is not. +@racket[Float-Complex]; @racket[0.0+1.0i] is of type +@racket[Float-Complex] but @racket[+1.0i] is not. To get the most of Typed Racket's optimizer, you should also favor rectangular coordinates over polar coordinates. diff --git a/collects/typed-scheme/scribblings/ts-reference.scrbl b/collects/typed-scheme/scribblings/ts-reference.scrbl index d43e2773..0e711b09 100644 --- a/collects/typed-scheme/scribblings/ts-reference.scrbl +++ b/collects/typed-scheme/scribblings/ts-reference.scrbl @@ -35,7 +35,7 @@ any expression of this type will not evaluate to a value.} @deftogether[( @defidform[Number] @defidform[Complex] -@defidform[Inexact-Complex] +@defidform[Float-Complex] @defidform[Real] @defidform[Float] @defidform[Nonnegative-Float]