diff --git a/typed-racket-doc/typed-racket/scribblings/reference/types.scrbl b/typed-racket-doc/typed-racket/scribblings/reference/types.scrbl index ec8d7d5ada..b12181ab54 100644 --- a/typed-racket-doc/typed-racket/scribblings/reference/types.scrbl +++ b/typed-racket-doc/typed-racket/scribblings/reference/types.scrbl @@ -53,7 +53,7 @@ several fixed-width integers types, detailed later in this section. numeric type, including all Racket numbers, both exact and inexact, including complex numbers. -@defnums[(Integer)] +@defnums[(Integer Exact-Integer)] Includes Racket's exact integers and corresponds to the @racket[exact-integer?] predicate. This is the most general type that is still valid for indexing and other operations that require integral values. @@ -63,7 +63,7 @@ Includes Racket's double-precision (default) floating-point numbers and corresponds to the @racket[flonum?] predicate. This type excludes single-precision floating-point numbers. -@defnums[(Single-Flonum)] +@defnums[(Single-Flonum Single-Float)] Includes Racket's single-precision floating-point numbers and corresponds to the @racket[single-flonum?] predicate. This type excludes double-precision floating-point numbers. @@ -72,7 +72,7 @@ floating-point numbers. Includes all of Racket's floating-point numbers, both single- and double-precision. -@defnums[(Exact-Rational)] +@defnums[(Rational Exact-Rational)] Includes Racket's exact rationals, which include fractions and exact integers. @defnums[(Real)] @@ -82,15 +82,29 @@ all floating-point numbers. This is the most general type for which comparisons @defnums[( Exact-Number +Flonum-Complex Float-Complex Single-Flonum-Complex +Single-Float-Complex Inexact-Complex Imaginary +Flonum-Imaginary +Float-Imaginary +Single-Flonum-Imaginary +Single-Float-Imaginary Exact-Complex Exact-Imaginary Inexact-Imaginary)] These types correspond to Racket's complex numbers. +@ex[ +(ann 1+1i Exact-Number) +(ann 1+1i Exact-Complex) +(ann 1+0i Exact-Number) +(eval:error (ann 1+0i Exact-Complex)) +(ann 0+1i Exact-Number) +(eval:error (ann 0+1i Exact-Complex))] + @history[#:changed "1.7"]{@elem{Added @racket[Imaginary], @racket[Inexact-Complex], @racket[Exact-Complex], @@ -103,20 +117,32 @@ negative, non-negative and non-positive subsets of the above types (where applicable). @defnums[( +Natural Positive-Integer +Positive-Exact-Integer Exact-Positive-Integer Nonnegative-Integer Exact-Nonnegative-Integer -Natural +Nonnegative-Exact-Integer Negative-Integer +Negative-Exact-Integer +Exact-Negative-Integer +Negative-Integer-Not-Fixnum Nonpositive-Integer +Nonpositive-Exact-Integer +Exact-Nonpositive-Integer +Positive-Integer-Not-Fixnum Zero Positive-Float Positive-Flonum +Positive-Float-Not-Nan +Positive-Flonum-Not-Nan Nonnegative-Float Nonnegative-Flonum Negative-Float Negative-Flonum +Negative-Float-Not-Nan +Negative-Flonum-Not-Nan Nonpositive-Float Nonpositive-Flonum Float-Negative-Zero @@ -128,13 +154,25 @@ Flonum-Zero Float-Nan Flonum-Nan Positive-Single-Flonum +Positive-Single-Float +Positive-Single-Flonum-Not-Nan +Positive-Single-Float-Not-Nan Nonnegative-Single-Flonum +Nonnegative-Single-Float Negative-Single-Flonum +Negative-Single-Float +Negative-Single-Flonum-Not-Nan +Negative-Single-Float-Not-Nan Nonpositive-Single-Flonum +Nonpositive-Single-Float Single-Flonum-Negative-Zero +Single-Float-Negative-Zero Single-Flonum-Positive-Zero +Single-Float-Positive-Zero Single-Flonum-Zero +Single-Float-Zero Single-Flonum-Nan +Single-Float-Nan Positive-Inexact-Real Nonnegative-Inexact-Real Negative-Inexact-Real @@ -143,10 +181,20 @@ Inexact-Real-Negative-Zero Inexact-Real-Positive-Zero Inexact-Real-Zero Inexact-Real-Nan +Positive-Rational Positive-Exact-Rational +Exact-Positive-Rational +Positive-Rational-Not-Integer +Nonnegative-Rational Nonnegative-Exact-Rational +Exact-Nonnegative-Rational +Negative-Rational Negative-Exact-Rational +Exact-Negative-Rational +Negative-Rational-Not-Integer +Nonpositive-Rational Nonpositive-Exact-Rational +Exact-Nonpositive-Rational Positive-Real Nonnegative-Real Negative-Real @@ -175,10 +223,13 @@ diagram are subtypes of its containing types. One Byte Positive-Byte +Byte>1 Index Positive-Index +Positive-Index-Not-Byte Fixnum Positive-Fixnum +Positive-Fixnum-Not-Index Nonnegative-Fixnum Negative-Fixnum Nonpositive-Fixnum @@ -204,14 +255,27 @@ needed to check the desired bounds at runtime. @defnums[( ExtFlonum +ExtFloat Positive-ExtFlonum +Positive-ExtFloat +Positive-ExtFlonum-Not-Nan +Positive-ExtFloat-Not-Nan Nonnegative-ExtFlonum +Nonnegative-ExtFloat Negative-ExtFlonum +Negative-ExtFloat +Negative-ExtFlonum-Not-Nan +Negative-ExtFloat-Not-Nan Nonpositive-ExtFlonum +Nonpositive-ExtFloat ExtFlonum-Negative-Zero +ExtFloat-Negative-Zero ExtFlonum-Positive-Zero +ExtFloat-Positive-Zero ExtFlonum-Zero +ExtFloat-Zero ExtFlonum-Nan +ExtFloat-Nan )] 80-bit @rtech{extflonum} types, for the values operated on by @racketmodname[racket/extflonum] exports. @@ -235,8 +299,10 @@ These are not part of the numeric tower. @deftype[Path] @deftype[Path-For-Some-System] @deftype[Regexp] +@deftype[Base-Regexp] @deftype[PRegexp] @deftype[Byte-Regexp] +@deftype[Byte-Base-Regexp] @deftype[Byte-PRegexp] @deftype[Bytes] @deftype[Namespace] @@ -249,7 +315,9 @@ These are not part of the numeric tower. @deftype[Module-Path] @deftype[Module-Path-Index] @deftype[Resolved-Module-Path] +@deftype[Other-System-Path] @deftype[Compiled-Module-Expression] +@deftype[Compiled-Non-Module-Expression] @deftype[Compiled-Expression] @deftype[Internal-Definition-Context] @deftype[Pretty-Print-Style-Table] @@ -272,6 +340,7 @@ These are not part of the numeric tower. @deftype[Subprocess] @deftype[Place] @deftype[Place-Channel] +@deftype[Base-Place-Channel] @deftype[Semaphore] @deftype[FSemaphore] @deftype[Will-Executor] @@ -1030,9 +1099,15 @@ prefab types with the (implicitly quoted) prefab-key } @defalias[Union U "type constructor"] +@defalias[∪ U "type constructor"] @defalias[Intersection ∩ "type constructor"] @defalias[→ -> "type constructor"] @defalias[case→ case-> "type constructor"] +@defalias[Box Boxof "type constructor"] +@defalias[Weak-Box Weak-Boxof "type constructor"] +@defalias[Custodian-Box Custodian-Boxof "type constructor"] +@defalias[MPair MPairof "type constructor"] +@defalias[None Nothing "type"] @defalias[∀ All "type"] @section{Other Types} diff --git a/typed-racket-lib/typed-racket/base-env/base-types.rkt b/typed-racket-lib/typed-racket/base-env/base-types.rkt index 9a4e42f75a..89fb6cc169 100644 --- a/typed-racket-lib/typed-racket/base-env/base-types.rkt +++ b/typed-racket-lib/typed-racket/base-env/base-types.rkt @@ -4,14 +4,34 @@ "../types/numeric-tower.rkt" (rename-in "../rep/type-rep.rkt" [Un -Un])) -[Complex -Number] -[Number -Number] +#| DONE +- Flonum/Float : they are the default, 64-bit floats, can be optimized + +- Undefined : initial value of letrec bindings + +- Sexpof : recursive union of sexps with `a` +- Syntaxof : syntax-e yields `a` +- Syntax-E : possible results of syntax-e on "2D" syntax +- Syntax : (Syntaxof Syntax-E): "2D" syntax +- Datum : (Sexpof Syntax), datum->syntax yields "2D" syntax +- Sexp : (Sexpof (U)), syntax->datum of "2D" syntax +|# + +#| TODO +- Dead-Code : not clear that it makes sense to export this +- Unsafe-Undefined : not clear that it makes sense to export this +|# + + +[Number -Number #:alias (Complex)] [Inexact-Complex -InexactComplex] -[Single-Flonum-Complex -SingleFlonumComplex] -[Float-Complex -FloatComplex] +[Single-Flonum-Complex -SingleFlonumComplex #:alias (Single-Float-Complex)] +[Flonum-Complex -FloatComplex #:alias (Float-Complex)] [Exact-Complex -ExactComplex] [Exact-Imaginary -ExactImaginary] [Inexact-Imaginary -InexactImaginary] +[Single-Flonum-Imaginary -SingleFlonumImaginary #:alias (Single-Float-Imaginary)] +[Flonum-Imaginary -FloatImaginary #:alias (Float-Imaginary)] [Imaginary -Imaginary] [Exact-Number -ExactNumber] [Real -Real] @@ -21,79 +41,77 @@ [Positive-Real -PosReal] [Real-Zero -RealZero] [Inexact-Real -InexactReal] -[Single-Flonum -SingleFlonum] +[Single-Flonum -SingleFlonum #:alias (Single-Float)] [Nonpositive-Inexact-Real -NonPosInexactReal] -[Nonpositive-Single-Flonum -NonPosSingleFlonum] +[Nonpositive-Single-Flonum -NonPosSingleFlonum #:alias (Nonpositive-Single-Float)] [Negative-Inexact-Real -NegInexactReal] -[Negative-Single-Flonum -NegSingleFlonum] +[Negative-Single-Flonum -NegSingleFlonum #:alias (Negative-Single-Float)] +[Negative-Single-Flonum-Not-Nan -NegSingleFlonumNoNan #:alias (Negative-Single-Float-Not-Nan)] [Nonnegative-Inexact-Real -NonNegInexactReal] -[Nonnegative-Single-Flonum -NonNegSingleFlonum] +[Nonnegative-Single-Flonum -NonNegSingleFlonum #:alias (Nonnegative-Single-Float)] [Positive-Inexact-Real -PosInexactReal] -[Positive-Single-Flonum -PosSingleFlonum] +[Positive-Single-Flonum -PosSingleFlonum #:alias (Positive-Single-Float)] +[Positive-Single-Flonum-Not-Nan -PosSingleFlonumNoNan #:alias (Positive-Single-Float-Not-Nan)] [Inexact-Real-Nan -InexactRealNan] [Inexact-Real-Zero -InexactRealZero] [Inexact-Real-Negative-Zero -InexactRealNegZero] [Inexact-Real-Positive-Zero -InexactRealPosZero] -[Single-Flonum-Nan -SingleFlonumNan] -[Single-Flonum-Zero -SingleFlonumZero] -[Single-Flonum-Negative-Zero -SingleFlonumNegZero] -[Single-Flonum-Positive-Zero -SingleFlonumPosZero] -;; these are the default, 64-bit floats, can be optimized -[Float -Flonum] ; both of these are valid -[Flonum -Flonum] -[Nonpositive-Float -NonPosFlonum] ; both of these are valid -[Nonpositive-Flonum -NonPosFlonum] -[Negative-Float -NegFlonum] ; both of these are valid -[Negative-Flonum -NegFlonum] -[Nonnegative-Float -NonNegFlonum] ; both of these are valid -[Nonnegative-Flonum -NonNegFlonum] -[Positive-Float -PosFlonum] ; both of these are valid -[Positive-Flonum -PosFlonum] -[Float-Nan -FlonumNan] -[Flonum-Nan -FlonumNan] -[Float-Zero -FlonumZero] ; both of these are valid -[Flonum-Zero -FlonumZero] -[Float-Negative-Zero -FlonumNegZero] ; both of these are valid -[Flonum-Negative-Zero -FlonumNegZero] -[Float-Positive-Zero -FlonumPosZero] ; both of these are valid -[Flonum-Positive-Zero -FlonumPosZero] -[Exact-Rational -Rat] -[Nonpositive-Exact-Rational -NonPosRat] -[Negative-Exact-Rational -NegRat] -[Nonnegative-Exact-Rational -NonNegRat] -[Positive-Exact-Rational -PosRat] -[Integer -Int] -[Nonpositive-Integer -NonPosInt] -[Negative-Integer -NegInt] -[Exact-Nonnegative-Integer -Nat] ; all three of these are valid -[Nonnegative-Integer -Nat] -[Natural -Nat] -[Exact-Positive-Integer -PosInt] ; both of these are valid -[Positive-Integer -PosInt] +[Single-Flonum-Nan -SingleFlonumNan #:alias (Single-Float-Nan)] +[Single-Flonum-Zero -SingleFlonumZero #:alias (Single-Float-Zero)] +[Single-Flonum-Negative-Zero -SingleFlonumNegZero #:alias (Single-Float-Negative-Zero)] +[Single-Flonum-Positive-Zero -SingleFlonumPosZero #:alias (Single-Float-Positive-Zero)] +[Flonum -Flonum #:alias (Float)] +[Nonpositive-Flonum -NonPosFlonum #:alias (Nonpositive-Float)] +[Negative-Flonum -NegFlonum #:alias (Negative-Float)] +[Negative-Flonum-Not-Nan -NegFlonumNoNan #:alias (Negative-Float-Not-Nan)] +[Nonnegative-Flonum -NonNegFlonum #:alias (Nonnegative-Float)] +[Positive-Flonum -PosFlonum #:alias (Positive-Float)] +[Positive-Flonum-Not-Nan -PosFlonumNoNan #:alias (Positive-Float-Not-Nan)] +[Flonum-Nan -FlonumNan #:alias (Float-Nan)] +[Flonum-Zero -FlonumZero #:alias (Float-Zero)] +[Flonum-Negative-Zero -FlonumNegZero #:alias (Float-Negative-Zero)] +[Flonum-Positive-Zero -FlonumPosZero #:alias (Float-Positive-Zero)] +[Rational -Rat #:alias (Exact-Rational)] +[Exact-Nonpositive-Rational -NonPosRat #:alias (Nonpositive-Rational Nonpositive-Exact-Rational)] +[Exact-Negative-Rational -NegRat #:alias (Negative-Rational Negative-Exact-Rational)] +[Exact-Nonnegative-Rational -NonNegRat #:alias (Nonnegative-Rational Nonnegative-Exact-Rational)] +[Exact-Positive-Rational -PosRat #:alias (Positive-Rational Positive-Exact-Rational)] +[Positive-Rational-Not-Integer -PosRatNotInt] +[Negative-Rational-Not-Integer -NegRatNotInt] +[Integer -Int #:alias (Exact-Integer)] +[Nonpositive-Integer -NonPosInt #:alias (Nonpositive-Exact-Integer Exact-Nonpositive-Integer)] +[Negative-Integer -NegInt #:alias (Negative-Exact-Integer Exact-Negative-Integer)] +[Negative-Integer-Not-Fixnum -NegIntNotFixnum] +[Natural -Nat #:alias (Nonnegative-Integer Nonnegative-Exact-Integer Exact-Nonnegative-Integer)] +[Exact-Positive-Integer -PosInt #:alias (Positive-Integer Positive-Exact-Integer)] +[Positive-Integer-Not-Fixnum -PosIntNotFixnum] [Fixnum -Fixnum] [Negative-Fixnum -NegFixnum] [Nonpositive-Fixnum -NonPosFixnum] [Nonnegative-Fixnum -NonNegFixnum] [Positive-Fixnum -PosFixnum] +[Positive-Fixnum-Not-Index -PosFixnumNotIndex] [Index -Index] [Positive-Index -PosIndex] +[Positive-Index-Not-Byte -PosIndexNotByte] [Byte -Byte] [Positive-Byte -PosByte] -[Zero (-val 0)] -[One (-val 1)] -[ExtFlonum -ExtFlonum] -[Nonpositive-ExtFlonum -NonPosExtFlonum] -[Negative-ExtFlonum -NegExtFlonum] -[Nonnegative-ExtFlonum -NonNegExtFlonum] -[Positive-ExtFlonum -PosExtFlonum] -[ExtFlonum-Nan -ExtFlonumNan] -[ExtFlonum-Zero -ExtFlonumZero] -[ExtFlonum-Negative-Zero -ExtFlonumNegZero] -[ExtFlonum-Positive-Zero -ExtFlonumPosZero] - +[Byte>1 -Byte>1] +[Zero -Zero] +[One -One] +[ExtFlonum -ExtFlonum #:alias (ExtFloat)] +[Nonpositive-ExtFlonum -NonPosExtFlonum #:alias (Nonpositive-ExtFloat)] +[Negative-ExtFlonum -NegExtFlonum #:alias (Negative-ExtFloat)] +[Negative-ExtFlonum-Not-Nan -NegExtFlonumNoNan #:alias (Negative-ExtFloat-Not-Nan)] +[Nonnegative-ExtFlonum -NonNegExtFlonum #:alias (Nonnegative-ExtFloat)] +[Positive-ExtFlonum -PosExtFlonum #:alias (Positive-ExtFloat)] +[Positive-ExtFlonum-Not-Nan -PosExtFlonumNoNan #:alias (Positive-ExtFloat-Not-Nan)] +[ExtFlonum-Nan -ExtFlonumNan #:alias (ExtFloat-Nan)] +[ExtFlonum-Zero -ExtFlonumZero #:alias (ExtFloat-Zero)] +[ExtFlonum-Negative-Zero -ExtFlonumNegZero #:alias (ExtFloat-Negative-Zero)] +[ExtFlonum-Positive-Zero -ExtFlonumPosZero #:alias (ExtFloat-Positive-Zero)] [Void -Void] -[Undefined -Undefined] ; initial value of letrec bindings -;; [Unsafe-Undefined -Unsafe-Undefined] ; not clear that it makes sense to export this +[Undefined -Undefined] [Boolean -Boolean] [Symbol -Symbol] [String -String] @@ -104,8 +122,10 @@ [Path-For-Some-System -SomeSystemPath] [Path-String -Pathlike] [Regexp -Regexp] +[Base-Regexp -Base-Regexp] [PRegexp -PRegexp] [Byte-Regexp -Byte-Regexp] +[Byte-Base-Regexp -Byte-Base-Regexp] [Byte-PRegexp -Byte-PRegexp] [Char -Char] [Namespace -Namespace] @@ -113,12 +133,12 @@ [Output-Port -Output-Port] [Bytes -Bytes] [EOF (-val eof)] -[Sexpof -Sexpof] ;; recursive union of sexps with a -[Syntaxof -Syntax] ;; syntax-e yields a -[Syntax-E In-Syntax] ;; possible results of syntax-e on "2D" syntax -[Syntax Any-Syntax] ;; (Syntaxof Syntax-E): "2D" syntax -[Datum Syntax-Sexp] ;; (Sexpof Syntax), datum->syntax yields "2D" syntax -[Sexp -Sexp] ;; (Sexpof (U)), syntax->datum of "2D" syntax +[Sexpof -Sexpof] +[Syntaxof -Syntax] +[Syntax-E In-Syntax] +[Syntax Any-Syntax] +[Datum Syntax-Sexp] +[Sexp -Sexp] [Identifier Ident] [Procedure top-func] [BoxTop -BoxTop] @@ -141,7 +161,9 @@ [Resolved-Module-Path -Resolved-Module-Path] [Module-Path -Module-Path] [Module-Path-Index -Module-Path-Index] +[Other-System-Path -OtherSystemPath] [Compiled-Module-Expression -Compiled-Module-Expression] +[Compiled-Non-Module-Expression -Compiled-Non-Module-Expression] [Compiled-Expression -Compiled-Expression] [Read-Table -Read-Table] [Special-Comment -Special-Comment] @@ -166,12 +188,11 @@ [Logger -Logger] [Log-Receiver -Log-Receiver] [Log-Level -Log-Level] -[Place-Channel -Place-Channel] [Place -Place] +[Place-Channel -Place-Channel] +[Base-Place-Channel -Base-Place-Channel] [Will-Executor -Will-Executor] [Environment-Variables -Environment-Variables] - - [Listof -Listof] [Vectorof -vec] [Vector -vec*] @@ -190,9 +211,9 @@ [Weak-HashTableTop -Weak-HashTableTop] [HashTable -HT] [Promise -Promise] -[Pair -pair] -[Boxof -box] -[Weak-Boxof -weak-box] +[Pairof -pair #:alias (Pair)] +[Boxof -box #:alias (Box)] +[Weak-Boxof -weak-box #:alias (Weak-Box)] [Channelof -channel] [Async-Channelof -async-channel] [Ephemeronof -Ephemeron] @@ -202,15 +223,13 @@ [False -False] [True -True] [Null -Null] -[Nothing (-Un)] +[Nothing (-Un) #:alias (None)] [Futureof -future] -[Pairof -pair] -[U -Un #:alias (Union Un)] +[∪ -Un #:alias (U Un Union)] [∩ -Inter #:alias (Intersection)] -[MPairof -mpair] +[MPairof -mpair #:alias (MPair)] [MListof -MListof] [Thread-Cellof -thread-cell] -[Custodian-Boxof -CustodianBox] - +[Custodian-Boxof -CustodianBox #:alias (Custodian-Box)] [Continuation-Mark-Keyof -Continuation-Mark-Keyof] [Prompt-Tagof -Prompt-Tagof] diff --git a/typed-racket-lib/typed-racket/rep/base-types.rkt b/typed-racket-lib/typed-racket/rep/base-types.rkt index a359096e68..929cccd231 100644 --- a/typed-racket-lib/typed-racket/rep/base-types.rkt +++ b/typed-racket-lib/typed-racket/rep/base-types.rkt @@ -135,7 +135,7 @@ #'module-path-index? module-path-index?] [-OtherSystemPath - OtherSystemPath + Other-System-Path #'(and/c path-for-some-system? (not/c path?)) (compose/and path-for-some-system? (¬ path?))] [-Cont-Mark-Set @@ -220,11 +220,11 @@ #'(λ (x) (eqv? x -0.0t0)) (λ (x) (eqv? x -0.0t0))] [-NegExtFlonumNoNan - Negative-ExtFlonum-No-NaN + Negative-ExtFlonum-Not-Nan #'(and/c extflonum? (λ (x) (extfl<= x 0.0t0))) (λ (x) (and (extflonum? x) (extfl<= x 0.0t0)))] [-PosExtFlonumNoNan - Positive-ExtFlonum-No-NaN + Positive-ExtFlonum-Not-Nan #'(and/c extflonum? (λ (x) (extfl>= x 0.0t0))) (λ (x) (and (extflonum? x) (extfl>= x 0.0t0)))] [-Dead-Code Dead-Code #'(make-none/c 'dead-code/c) (λ (v) #f)]) diff --git a/typed-racket-lib/typed-racket/rep/numeric-base-types.rkt b/typed-racket-lib/typed-racket/rep/numeric-base-types.rkt index 6953ee60fd..b9b5e92890 100644 --- a/typed-racket-lib/typed-racket/rep/numeric-base-types.rkt +++ b/typed-racket-lib/typed-racket/rep/numeric-base-types.rkt @@ -94,7 +94,7 @@ [-Zero Zero #'(λ (n) (eq? n 0)) (λ (n) (eq? n 0))] [-One One #'(λ (n) (eq? n 1)) (λ (n) (eq? n 1))] [-Byte>1 - Byte-Larger-Than-One + Byte>1 #'(λ (n) (and (byte? n) (> n 1))) (λ (n) (and (byte? n) (> n 1)))] [-PosIndexNotByte @@ -151,11 +151,11 @@ #'(λ (x) (eqv? x -0.0)) (λ (x) (eqv? x -0.0))] [-PosFlonumNoNan - Positive-Float-No-NaN + Positive-Float-Not-Nan #'(and/c flonum? positive?) (λ (x) (and (flonum? x) (positive? x)))] [-NegFlonumNoNan - Negative-Float-No-NaN + Negative-Float-Not-Nan #'(and/c flonum? negative?) (λ (x) (and (flonum? x) (negative? x)))] [-SingleFlonumNan @@ -172,11 +172,11 @@ #'(λ (x) (and (single-flonum? x) (eqv? x (real->single-flonum -0.0f0)))) (λ (x) (and (single-flonum? x) (eqv? x (real->single-flonum -0.0f0))))] [-PosSingleFlonumNoNan - Positive-Single-Flonum-No-Nan + Positive-Single-Flonum-Not-Nan #'(and/c single-flonum? positive?) (λ (x) (and (single-flonum? x) (positive? x)))] [-NegSingleFlonumNoNan - Negative-Single-Flonum-No-Nan + Negative-Single-Flonum-Not-Nan #'(and/c single-flonum? negative?) (λ (x) (and (single-flonum? x) (negative? x)))] [-ExactImaginary diff --git a/typed-racket-test/unit-tests/interactive-tests.rkt b/typed-racket-test/unit-tests/interactive-tests.rkt index dd542c8aeb..9e31c31dc2 100644 --- a/typed-racket-test/unit-tests/interactive-tests.rkt +++ b/typed-racket-test/unit-tests/interactive-tests.rkt @@ -148,7 +148,7 @@ (:type 1)) (test-form (regexp-quote "(U Positive-Byte Zero)") (:type Byte)) - (test-form (regexp-quote "(U 0 1 Byte-Larger-Than-One") + (test-form (regexp-quote "(U 0 1 Byte>1") (:type #:verbose Byte)) (test-form-exn #rx":type.*applied to arguments" :type) diff --git a/typed-racket-test/unit-tests/type-printer-tests.rkt b/typed-racket-test/unit-tests/type-printer-tests.rkt index ebc7420f12..c1cc87cfdf 100644 --- a/typed-racket-test/unit-tests/type-printer-tests.rkt +++ b/typed-racket-test/unit-tests/type-printer-tests.rkt @@ -49,11 +49,11 @@ (check-prints-as? (-val #\a) "#\\a") (check-prints-as? Univ "Any") (check-prints-as? (Un (-val #t) (-val #f)) "Boolean") - (check-prints-as? (-lst -Nat) "(Listof Nonnegative-Integer)") + (check-prints-as? (-lst -Nat) "(Listof Natural)") (check-prints-as? (-Listof -Nat) - "(Listof Nonnegative-Integer)") + "(Listof Natural)") (check-prints-as? (make-Mu 'x (Un -Null (-pair -Nat (make-F 'x)))) - "(Listof Nonnegative-Integer)") + "(Listof Natural)") (check-prints-as? (-lst* -String -Symbol) "(List String Symbol)") (check-prints-as? (-Tuple* (list -String -Symbol) -String) "(List* String Symbol String)") @@ -67,9 +67,9 @@ (check-prints-as? -Custodian "Custodian") (check-prints-as? (make-Opaque #'integer?) "(Opaque integer?)") - (check-prints-as? (make-Immutable-Vector -Nat) "(Immutable-Vectorof Nonnegative-Integer)") - (check-prints-as? (make-Mutable-Vector -Nat) "(Mutable-Vectorof Nonnegative-Integer)") - (check-prints-as? (make-Vector -Nat) "(Vectorof Nonnegative-Integer)") + (check-prints-as? (make-Immutable-Vector -Nat) "(Immutable-Vectorof Natural)") + (check-prints-as? (make-Mutable-Vector -Nat) "(Mutable-Vectorof Natural)") + (check-prints-as? (make-Vector -Nat) "(Vectorof Natural)") (check-prints-as? (make-Immutable-HeterogeneousVector (list -Symbol -String)) "(Immutable-Vector Symbol String)") (check-prints-as? (make-Mutable-HeterogeneousVector (list -Symbol -String)) @@ -305,7 +305,7 @@ (check-pretty-prints-as? (-val #\a) "#\\a") (check-pretty-prints-as? Univ "Any") (check-pretty-prints-as? (Un (-val #t) (-val #f)) "Boolean") - (check-pretty-prints-as? (-lst -Nat) "(Listof Nonnegative-Integer)") + (check-pretty-prints-as? (-lst -Nat) "(Listof Natural)") (check-pretty-prints-as? (-polydots (c a b) (cl->*