(defn ^:skip-wiki def-impl
"Do not call this directly, use 'def'"
[k form spec]
(c/assert (c/and (ident? k) (namespace k)) "k must be namespaced keyword or resolvable symbol")
(let [spec (if (c/or (spec? spec) (regex? spec) (get @registry-ref spec))
spec
(spec-impl form spec nil nil))]
(swap! registry-ref assoc k (with-name spec k))
k))