> On Jan 11, 2018, at 9:52 AM, Sam Tobin-Hochstadt wrote:
>
> This is an intentional design choice, but I also think it's pretty
> hard to avoid. In particular, consider immutable hash tables. In that
> case, (HT A B) is a subtype of (HT A* B), if A <: A*. But then for
> immutable hash tables,
This is an intentional design choice, but I also think it's pretty
hard to avoid. In particular, consider immutable hash tables. In that
case, (HT A B) is a subtype of (HT A* B), if A <: A*. But then for
immutable hash tables, your `checked-hash-ref` has the same issue that
the original type for `h
I was surprised and a wee bit dismayed this morning to see that this code,
using hash-ref with the wrong key type, typechecks:
#lang typed/racket
(define my-hash : (HashTable String String)
(make-immutable-hash
'(("abc" . "def")
("ghi" . "jkl"
(hash-ref my-hash 1234)
So, I printe
3 matches
Mail list logo