core-typed 2023-10-20

another question:

=> (t/cf (update-vals {:a 1 :b 2} inc))
(t/Map (t/U (typed.clojure/Val :a) (typed.clojure/Val :b)) Long)
Huh? should this not be (t/HMap :mandatory {:a long :b long})?

If the annotation has t/Map in it, then t/HMap will lose information.

I haven't figured out a way to encode update-vals in a type for HMap's yet.

It needs more work on internal intersection simplification, but I'm brainstorming a type like this:

update-vals : (t/All [[x :< (Map Any Any)] vs vs'] [(I x (Map Any vs)) [vs :-> vs'] :-> (I x (Map Any vs')])

It's not quite right since a new hash-map is returned. e.g., it loses sortedness etc