Skip to content

Commit

Permalink
specs are not ifns
Browse files Browse the repository at this point in the history
same as Clojure 6244247fc
  • Loading branch information
dnolen committed Jun 17, 2016
1 parent b81bfb8 commit 7a4e70f
Showing 1 changed file with 0 additions and 16 deletions.
16 changes: 0 additions & 16 deletions src/main/cljs/cljs/spec.cljs
Original file line number Diff line number Diff line change
Expand Up @@ -387,8 +387,6 @@
keys->specs #(c/or (k->s %) %)
id (random-uuid)]
(reify
IFn
(-invoke [this x] (valid? this x))
Spec
(conform* [_ m]
(if (keys-pred m)
Expand Down Expand Up @@ -471,8 +469,6 @@
(named? pred) (cond-> (the-spec pred) gfn (with-gen gfn))
:else
(reify
IFn
(-invoke [this x] (valid? this x))
Spec
(conform* [_ x] (dt pred x form cpred?))
(unform* [_ x] (if cpred?
Expand Down Expand Up @@ -503,8 +499,6 @@
#(assoc %1 retag %2)
retag)]
(reify
IFn
(-invoke [this x] (valid? this x))
Spec
(conform* [_ x] (if-let [pred (predx x)]
(dt pred x form)
Expand Down Expand Up @@ -543,8 +537,6 @@
([forms preds] (tuple-impl forms preds nil))
([forms preds gfn]
(reify
IFn
(-invoke [this x] (valid? this x))
Spec
(conform* [_ x]
(if-not (c/and (vector? x)
Expand Down Expand Up @@ -616,8 +608,6 @@
(tagged-ret [(keys i) ret]))))
::invalid)))]
(reify
IFn
(-invoke [this x] (valid? this x))
Spec
(conform* [_ x] (cform x))
(unform* [_ [k x]] (unform (kps k) x))
Expand Down Expand Up @@ -669,8 +659,6 @@
"Do not call this directly, use 'and'"
[forms preds gfn]
(reify
IFn
(-invoke [this x] (valid? this x))
Spec
(conform* [_ x] (and-preds x preds forms))
(unform* [_ x] (reduce #(unform %2 %1) x (reverse preds)))
Expand Down Expand Up @@ -999,8 +987,6 @@
"Do not call this directly, use 'spec' with a regex op argument"
[re gfn]
(reify
IFn
(-invoke [this x] (valid? this x))
Spec
(conform* [_ x]
(if (c/or (nil? x) (coll? x))
Expand Down Expand Up @@ -1046,8 +1032,6 @@
[argspec aform retspec rform fnspec fform gfn]
(let [specs {:args argspec :ret retspec :fn fnspec}]
(reify
IFn
(-invoke [this x] (valid? this x))
ILookup
(-lookup [this k] (get specs k))
(-lookup [_ k not-found] (get specs k not-found))
Expand Down

0 comments on commit 7a4e70f

Please sign in to comment.