|
4 | 4 | (for-template racket/base racket/list racket/unsafe/ops racket/flonum racket/extflonum racket/fixnum) |
5 | 5 | "../utils/tc-utils.rkt" |
6 | 6 | (rename-in "../types/abbrev.rkt" [-Boolean B] [-Symbol Sym]) |
7 | | - (rename-in "../types/numeric-tower.rkt" [-Number N])) |
| 7 | + (rename-in "../types/numeric-tower.rkt" [-Number N]) |
| 8 | + (only-in "base-structs.rkt" -Arity-At-Least)) |
8 | 9 |
|
9 | 10 | (provide indexing) |
10 | 11 |
|
|
239 | 240 | [flvector (->* (list) -Flonum -FlVector)] |
240 | 241 | [make-flvector (cl->* (-> index-type -FlVector) |
241 | 242 | (-> index-type -Flonum -FlVector))] |
242 | | - |
| 243 | + |
243 | 244 | [shared-flvector (->* (list) -Flonum -FlVector)] |
244 | 245 | [make-shared-flvector (cl->* (-> index-type -FlVector) |
245 | 246 | (-> index-type -Flonum -FlVector))] |
|
254 | 255 | [unsafe-flvector-length (-> -FlVector -Index)] |
255 | 256 | [unsafe-flvector-ref (-> -FlVector index-type -Flonum)] |
256 | 257 | [unsafe-flvector-set! (-> -FlVector index-type -Flonum -Void)] |
257 | | - |
| 258 | + |
258 | 259 | ;; Section 4.2.5.2 (ExtFlonum Vectors) |
259 | 260 | [extflvector? (make-pred-ty -ExtFlVector)] |
260 | 261 | [extflvector (->* (list) -ExtFlonum -ExtFlVector)] |
261 | 262 | [make-extflvector (cl->* (-> index-type -ExtFlVector) |
262 | 263 | (-> index-type -ExtFlonum -ExtFlVector))] |
263 | | - |
| 264 | + |
264 | 265 | [shared-extflvector (->* (list) -ExtFlonum -ExtFlVector)] |
265 | 266 | [make-shared-extflvector (cl->* (-> index-type -ExtFlVector) |
266 | 267 | (-> index-type -ExtFlonum -ExtFlVector))] |
|
275 | 276 | [unsafe-extflvector-length (-> -ExtFlVector -Index)] |
276 | 277 | [unsafe-extflvector-ref (-> -ExtFlVector index-type -ExtFlonum)] |
277 | 278 | [unsafe-extflvector-set! (-> -ExtFlVector index-type -ExtFlonum -Void)] |
278 | | - |
| 279 | + |
279 | 280 | ;; Section 4.2.4.2 (Fixnum vectors) |
280 | 281 | [fxvector? (make-pred-ty -FxVector)] |
281 | 282 | [fxvector (->* (list) -Fixnum -FxVector)] |
282 | 283 | [make-fxvector (cl->* (-> index-type -FxVector) |
283 | 284 | (-> index-type -Fixnum -FxVector))] |
284 | | - |
| 285 | + |
285 | 286 | [shared-fxvector (->* (list) -Fixnum -FxVector)] |
286 | 287 | [make-shared-fxvector (cl->* (-> index-type -FxVector) |
287 | 288 | (-> index-type -Fixnum -FxVector))] |
|
344 | 345 | [raise-arguments-error |
345 | 346 | (->* (list Sym -String) Univ (Un))] |
346 | 347 | [raise-range-error |
347 | | - (-> Sym -String -String index-type Univ index-type index-type (Un index-type (-val #f)) (Un))] |
| 348 | + (-> Sym -String -String index-type Univ index-type index-type (-opt index-type) (Un))] |
| 349 | + [raise-arity-error |
| 350 | + (->* (list (Un Sym top-func) (Un index-type -Arity-At-Least (-lst (Un index-type -Arity-At-Least)))) Univ (Un))] |
| 351 | + [raise-arity-mask-error |
| 352 | + (->* (list (Un Sym top-func) index-type) Univ (Un))] |
| 353 | + [raise-result-arity-error |
| 354 | + (->* (list (-opt Sym) index-type (-opt -String)) Univ (Un))] |
348 | 355 |
|
349 | 356 | )) |
350 | | - |
|
0 commit comments