Re: [racket-users] Vector lenght and indices contracts

2019-12-04 Thread Matthew Flatt
I think it makes sense to refine the contract to guarantee a fixnum result for `vector-length`. This fact is currently documented in `unsafe-vetcor-length`, because that's the layer where it has seemed sensible to talk about fixnums in the past, but that's not where anyone would think to look.

Re: [racket-users] Vector lenght and indices contracts

2019-12-04 Thread George Neuner
On 12/4/2019 11:03 AM, Dominik Pantůček wrote looking at vector-length[1] documentation, it returns (exact-nonnegative-integer?). However, as far as I can tell, it returns (fixnum?). Also for subsequent contracts in the vector's documentation all indices are assumed to be

[racket-users] Vector lenght and indices contracts

2019-12-04 Thread Dominik Pantůček
Hello, looking at vector-length[1] documentation, it returns (exact-nonnegative-integer?). However, as far as I can tell, it returns (fixnum?). Also for subsequent contracts in the vector's documentation all indices are assumed to be (exact-nonnegative-integer?) but usually it is impossible on