Re: [racket-users] Are fixnums guaranteed to be `eq?` whenever they are `=`/`equal?` ?

2016-03-14 Thread Matthew Flatt
At Mon, 14 Mar 2016 19:59:51 -0400, Tony Garnock-Jones wrote: > On 03/14/2016 07:53 PM, Matthew Flatt wrote: > > [fixnum eqness is guaranteed by the docs. > > [...] And keywords [are also guaranteed]. > > [...] [And] Booleans, void, and characters with a scalar value under 256. > > > > Opaque obje

Re: [racket-users] Are fixnums guaranteed to be `eq?` whenever they are `=`/`equal?` ?

2016-03-14 Thread Tony Garnock-Jones
On 03/14/2016 07:53 PM, Matthew Flatt wrote: > [fixnum eqness is guaranteed by the docs. > [...] And keywords [are also guaranteed]. > [...] [And] Booleans, void, and characters with a scalar value under 256. > > Opaque objects like custodians and inspectors are also `equal?` only > when they are

Re: [racket-users] Are fixnums guaranteed to be `eq?` whenever they are `=`/`equal?` ?

2016-03-14 Thread Matthew Flatt
At Mon, 14 Mar 2016 19:43:51 -0400, Tony Garnock-Jones wrote: > Can I rely on the truth of the following: > > (implies (and (fixnum? x) (fixnum? y) (= x y)) >(eq? x y)) > > ? Yes, that's guaranteed by the docs. > I know I can rely on something similar for symbols. And keywords.