Fork me on GitHub
#core-typed
<
2020-02-26
>
ambrosebs02:02:54

phew all the coordinate renames are done. exactly zero people should care right now, but I can get on with actual work. 1.0.10 is out https://github.com/typedclojure/typedclojure/blob/master/UPGRADING.md#from-typedclojure-107-to-typedclojure-1010

ambrosebs04:02:31

this is the PoC I had last week 🙂

ambrosebs04:02:54

@yogsototh ^^ you asked me last week if I had a counter-example for clojure.core/map's polymorphic spec 🙂

ambrosebs23:02:03

(s/register
  ::map1-dependent
  (all [:N (tvar-spec :kind nat-int?
                      :gen #(gen/large-integer
                              {:min 0
                               :max 100}))
        :x (tvar-spec :kind ::t/any-spec?)
        :y (tvar-spec :kind ::t/any-spec?)]
       (s/fspec :args (s/cat :fn (s/fspec :args (s/cat :x (tvar :x))
                                          :ret (tvar :y))
                             :colls (s/every (tvar :x)
                                             :count (tvar :N)))
                :ret (s/every (tvar :y)
                              :count (tvar :N)))))