This page is not created by, affiliated with, or supported by Slack Technologies, Inc.
2020-08-21
Channels
- # announcements (1)
- # babashka (39)
- # beginners (91)
- # cider (9)
- # clj-kondo (10)
- # cljsrn (1)
- # clojure (54)
- # clojure-europe (45)
- # clojure-italy (2)
- # clojure-nl (1)
- # clojure-spec (39)
- # clojure-uk (21)
- # clojurescript (7)
- # core-typed (1)
- # cursive (9)
- # data-science (1)
- # datomic (2)
- # docker (3)
- # emacs (11)
- # figwheel-main (11)
- # fulcro (19)
- # java (1)
- # juxt (1)
- # kaocha (68)
- # malli (7)
- # meander (5)
- # off-topic (76)
- # pedestal (1)
- # re-frame (6)
- # reveal (1)
- # rum (2)
- # shadow-cljs (48)
- # sql (6)
- # tools-deps (47)
- # vim (8)
- # xtdb (23)
Hi, when trying out typed.clj/spec
I get an exception trying to validate identity:
(s/def ::identity
#_"Polymorphic type for clojure.core/identity"
(t/all :binder (t/binder :x (t/bind-tv))
:body
(s/fspec :args (s/cat :x (t/tv :x))
:ret (t/tv :x))))
:blah.core/identity
blah.core> (s/valid? ::identity identity)
1. Unhandled java.lang.ClassCastException
class typed.clj.spec.impl$all_impl$reify__6352 cannot be cast to
class clojure.lang.IFn (typed.clj.spec.impl$all_impl$reify__6352 is
in unnamed module of loader clojure.lang.DynamicClassLoader
@29282ff0; clojure.lang.IFn is in unnamed module of loader 'app')
Is typed.clj/spec
incompatible with spec1?