Skip to content

Commit 4f0d671

Browse files
committed
Update.
1 parent 816cd44 commit 4f0d671

File tree

6 files changed

+191
-97
lines changed

6 files changed

+191
-97
lines changed

typed-racket-doc/typed-racket/scribblings/reference/types.scrbl

+79-4
Original file line numberDiff line numberDiff line change
@@ -53,7 +53,7 @@ several fixed-width integers types, detailed later in this section.
5353
numeric type, including all Racket numbers, both exact and inexact, including
5454
complex numbers.
5555

56-
@defnums[(Integer)]
56+
@defnums[(Integer Exact-Integer)]
5757
Includes Racket's exact integers and corresponds to the
5858
@racket[exact-integer?] predicate. This is the most general type that is still
5959
valid for indexing and other operations that require integral values.
@@ -63,7 +63,7 @@ Includes Racket's double-precision (default) floating-point numbers and
6363
corresponds to the @racket[flonum?] predicate. This type excludes
6464
single-precision floating-point numbers.
6565

66-
@defnums[(Single-Flonum)]
66+
@defnums[(Single-Flonum Single-Float)]
6767
Includes Racket's single-precision floating-point numbers and corresponds to
6868
the @racket[single-flonum?] predicate. This type excludes double-precision
6969
floating-point numbers.
@@ -72,7 +72,7 @@ floating-point numbers.
7272
Includes all of Racket's floating-point numbers, both single- and
7373
double-precision.
7474

75-
@defnums[(Exact-Rational)]
75+
@defnums[(Rational Exact-Rational)]
7676
Includes Racket's exact rationals, which include fractions and exact integers.
7777

7878
@defnums[(Real)]
@@ -82,15 +82,29 @@ all floating-point numbers. This is the most general type for which comparisons
8282

8383
@defnums[(
8484
Exact-Number
85+
Flonum-Complex
8586
Float-Complex
8687
Single-Flonum-Complex
88+
Single-Float-Complex
8789
Inexact-Complex
8890
Imaginary
91+
Flonum-Imaginary
92+
Float-Imaginary
93+
Single-Flonum-Imaginary
94+
Single-Float-Imaginary
8995
Exact-Complex
9096
Exact-Imaginary
9197
Inexact-Imaginary)]
9298
These types correspond to Racket's complex numbers.
9399

100+
@ex[
101+
(ann 1+1i Exact-Number)
102+
(ann 1+1i Exact-Complex)
103+
(ann 1+0i Exact-Number)
104+
(eval:error (ann 1+0i Exact-Complex))
105+
(ann 0+1i Exact-Number)
106+
(eval:error (ann 0+1i Exact-Complex))]
107+
94108
@history[#:changed "1.7"]{@elem{Added @racket[Imaginary],
95109
@racket[Inexact-Complex],
96110
@racket[Exact-Complex],
@@ -103,20 +117,32 @@ negative, non-negative and non-positive subsets of the above types (where
103117
applicable).
104118

105119
@defnums[(
120+
Natural
106121
Positive-Integer
122+
Positive-Exact-Integer
107123
Exact-Positive-Integer
108124
Nonnegative-Integer
109125
Exact-Nonnegative-Integer
110-
Natural
126+
Nonnegative-Exact-Integer
111127
Negative-Integer
128+
Negative-Exact-Integer
129+
Exact-Negative-Integer
130+
Negative-Integer-Not-Fixnum
112131
Nonpositive-Integer
132+
Nonpositive-Exact-Integer
133+
Exact-Nonpositive-Integer
134+
Positive-Integer-Not-Fixnum
113135
Zero
114136
Positive-Float
115137
Positive-Flonum
138+
Positive-Float-Not-Nan
139+
Positive-Flonum-Not-Nan
116140
Nonnegative-Float
117141
Nonnegative-Flonum
118142
Negative-Float
119143
Negative-Flonum
144+
Negative-Float-Not-Nan
145+
Negative-Flonum-Not-Nan
120146
Nonpositive-Float
121147
Nonpositive-Flonum
122148
Float-Negative-Zero
@@ -128,13 +154,25 @@ Flonum-Zero
128154
Float-Nan
129155
Flonum-Nan
130156
Positive-Single-Flonum
157+
Positive-Single-Float
158+
Positive-Single-Flonum-Not-Nan
159+
Positive-Single-Float-Not-Nan
131160
Nonnegative-Single-Flonum
161+
Nonnegative-Single-Float
132162
Negative-Single-Flonum
163+
Negative-Single-Float
164+
Negative-Single-Flonum-Not-Nan
165+
Negative-Single-Float-Not-Nan
133166
Nonpositive-Single-Flonum
167+
Nonpositive-Single-Float
134168
Single-Flonum-Negative-Zero
169+
Single-Float-Negative-Zero
135170
Single-Flonum-Positive-Zero
171+
Single-Float-Positive-Zero
136172
Single-Flonum-Zero
173+
Single-Float-Zero
137174
Single-Flonum-Nan
175+
Single-Float-Nan
138176
Positive-Inexact-Real
139177
Nonnegative-Inexact-Real
140178
Negative-Inexact-Real
@@ -143,10 +181,20 @@ Inexact-Real-Negative-Zero
143181
Inexact-Real-Positive-Zero
144182
Inexact-Real-Zero
145183
Inexact-Real-Nan
184+
Positive-Rational
146185
Positive-Exact-Rational
186+
Exact-Positive-Rational
187+
Positive-Rational-Not-Integer
188+
Nonnegative-Rational
147189
Nonnegative-Exact-Rational
190+
Exact-Nonnegative-Rational
191+
Negative-Rational
148192
Negative-Exact-Rational
193+
Exact-Negative-Rational
194+
Negative-Rational-Not-Integer
195+
Nonpositive-Rational
149196
Nonpositive-Exact-Rational
197+
Exact-Nonpositive-Rational
150198
Positive-Real
151199
Nonnegative-Real
152200
Negative-Real
@@ -175,10 +223,13 @@ diagram are subtypes of its containing types.
175223
One
176224
Byte
177225
Positive-Byte
226+
Byte>1
178227
Index
179228
Positive-Index
229+
Positive-Index-Not-Byte
180230
Fixnum
181231
Positive-Fixnum
232+
Positive-Fixnum-Not-Index
182233
Nonnegative-Fixnum
183234
Negative-Fixnum
184235
Nonpositive-Fixnum
@@ -204,14 +255,27 @@ needed to check the desired bounds at runtime.
204255

205256
@defnums[(
206257
ExtFlonum
258+
ExtFloat
207259
Positive-ExtFlonum
260+
Positive-ExtFloat
261+
Positive-ExtFlonum-Not-Nan
262+
Positive-ExtFloat-Not-Nan
208263
Nonnegative-ExtFlonum
264+
Nonnegative-ExtFloat
209265
Negative-ExtFlonum
266+
Negative-ExtFloat
267+
Negative-ExtFlonum-Not-Nan
268+
Negative-ExtFloat-Not-Nan
210269
Nonpositive-ExtFlonum
270+
Nonpositive-ExtFloat
211271
ExtFlonum-Negative-Zero
272+
ExtFloat-Negative-Zero
212273
ExtFlonum-Positive-Zero
274+
ExtFloat-Positive-Zero
213275
ExtFlonum-Zero
276+
ExtFloat-Zero
214277
ExtFlonum-Nan
278+
ExtFloat-Nan
215279
)]
216280
80-bit @rtech{extflonum} types, for the values operated on by
217281
@racketmodname[racket/extflonum] exports.
@@ -235,8 +299,10 @@ These are not part of the numeric tower.
235299
@deftype[Path]
236300
@deftype[Path-For-Some-System]
237301
@deftype[Regexp]
302+
@deftype[Base-Regexp]
238303
@deftype[PRegexp]
239304
@deftype[Byte-Regexp]
305+
@deftype[Byte-Base-Regexp]
240306
@deftype[Byte-PRegexp]
241307
@deftype[Bytes]
242308
@deftype[Namespace]
@@ -249,7 +315,9 @@ These are not part of the numeric tower.
249315
@deftype[Module-Path]
250316
@deftype[Module-Path-Index]
251317
@deftype[Resolved-Module-Path]
318+
@deftype[Other-System-Path]
252319
@deftype[Compiled-Module-Expression]
320+
@deftype[Compiled-Non-Module-Expression]
253321
@deftype[Compiled-Expression]
254322
@deftype[Internal-Definition-Context]
255323
@deftype[Pretty-Print-Style-Table]
@@ -272,6 +340,7 @@ These are not part of the numeric tower.
272340
@deftype[Subprocess]
273341
@deftype[Place]
274342
@deftype[Place-Channel]
343+
@deftype[Base-Place-Channel]
275344
@deftype[Semaphore]
276345
@deftype[FSemaphore]
277346
@deftype[Will-Executor]
@@ -1030,9 +1099,15 @@ prefab types with the (implicitly quoted) prefab-key
10301099
}
10311100

10321101
@defalias[Union U "type constructor"]
1102+
@defalias[∪ U "type constructor"]
10331103
@defalias[Intersection ∩ "type constructor"]
10341104
@defalias[→ -> "type constructor"]
10351105
@defalias[case→ case-> "type constructor"]
1106+
@defalias[Box Boxof "type constructor"]
1107+
@defalias[Weak-Box Weak-Boxof "type constructor"]
1108+
@defalias[Custodian-Box Custodian-Boxof "type constructor"]
1109+
@defalias[MPair MPairof "type constructor"]
1110+
@defalias[None Nothing "type"]
10361111
@defalias[∀ All "type"]
10371112

10381113
@section{Other Types}

0 commit comments

Comments
 (0)