Re: [racket-users] Weirdness with typed racket and hashes

2016-05-23 Thread Matthew Eric Bassett
Thank you, Brian, that was very helpful. On 05/23/2016 03:46 PM, Brian LaChance wrote: > Hi, Matthew > > I'm pretty sure the problem you're having is that, even when you make > a hash table using hash, TR can't tell that it's immutable. It only > has one hash table type, HashTable, which is used

Re: [racket-users] Weirdness with typed racket and hashes

2016-05-23 Thread Brian LaChance
Hi, Matthew I'm pretty sure the problem you're having is that, even when you make a hash table using hash, TR can't tell that it's immutable. It only has one hash table type, HashTable, which is used for both mutable and immutable variants. You'll see a similar problem with your cons examples if

[racket-users] Weirdness with typed racket and hashes

2016-05-23 Thread Matthew Eric Bassett
Hi all, I noticed something weird today when playing around with typed racket (and flirting with the idea of using it in production). If I do something like: -> (ann (cons 'a 1) (Pairof Any Any)) - : (Pairof Any Any) '(a . 1) That works as expected. As does: -> (define t (cons 'a 1)) -> (ann