typed.clj.spec.impl

Implementation details for typed.clj.spec{1,2}

*all-iterations*

dynamic

coerce-dotted-cat

(coerce-dotted-cat {:keys [spec-version]} tv xs)

create-all

(create-all version-info {:keys [binder body]})

create-bind-tv

(create-bind-tv version-info {:keys [tv position kind gen]})

create-binder

(create-binder version-info {:keys [tvs]})

create-fcase

(create-fcase version-info {:keys [cases default]})

create-fold-binders

(create-fold-binders version-info {:keys [template tv wrap]})

create-inst

(create-inst version-info {:keys [poly args-map]})

create-reduced-of

(create-reduced-of version-info {:keys [s]})

create-spec-between

(create-spec-between version-info {:keys [lower upper]})

create-tapp

(create-tapp version-info {:keys [tfn args-map]})

create-tfn

(create-tfn version-info {:keys [binder body]})

create-tv

(create-tv version-info {:keys [tv wrap]})

expand-all

(expand-all version-info [op & {:keys [binder body]}])

expand-bind-tv

(expand-bind-tv {:keys [spec-version], :as version-info} [op & {tv :name, :keys [position kind gen], :or {position #{:output :input}}, :as opt}])

expand-binder

(expand-binder version-info [op & tvs])

expand-fcase

(expand-fcase version-info [op & args :as form])

expand-fold-binders

(expand-fold-binders version-info [op template tv & opt])

expand-inst

(expand-inst version-info [op poly args-map & more])

expand-reduced-of

(expand-reduced-of version-info [op s & more])

expand-spec-between

(expand-spec-between {:keys [spec-version]} [op & {:keys [upper lower], :or {upper (quote clojure.core/any?)}}])

expand-tapp

(expand-tapp version-info [op tfn args-map & more])

expand-tfn

(expand-tfn {:keys [spec-version]} [op & {:keys [binder body], :as opt}])

expand-tv

(expand-tv version-info [op tv & {:keys [wrap], :as opt}])

generic-spec-impl

macro

(generic-spec-impl spec-version spec-impl extra-impl)

prewalk

added in 1.1

(prewalk f config form)
Like postwalk, but does pre-order traversal. Short-circuits on Reduced.

sample-seq

spec1-reify-body

(spec1-reify-body spec-impl spec-version)

spec1-version-info-base

spec2-reify-body

(spec2-reify-body spec-impl spec-version)

spec2-version-info-base

subst-binder

(subst-binder binder sbst {:keys [spec-version], :as version-info})

subst-tv

(subst-tv spec sbst opt)

subst-tv-all-like

(subst-tv-all-like spec sbst version-info)

subst-tv-op

multimethod

Extension point for type-variable substitution over specs.
Extend this multimethod if your spec interacts with type variable
scope.

To extend to symbolic spec with form (my.ns/foobar spec),
extend subst-tv-op with a 'my.ns/foobar method that returns
a fully-substituted spec wrt substitution sbst.

eg., (defmethod subst-tv-op `my.ns/foobar
       [[_ spec] sbst {:keys [subst-tv] :as opt}]
       (subst-tv spec sbst opt))

sbst is a map from type variable names to values to substitute
for them.

opt map consists of:
- :subst-tv    a function taking a spec form and a substitution and
               returns a spec form after applying the substitution.

subst-tv-op-fold-binders

(subst-tv-op-fold-binders spec sbst opt)

subst-tv-op-tv

(subst-tv-op-tv spec sbst opt)

walk

(walk inner outer config form)
Traverses form, an arbitrary data structure.  inner and outer are
functions.  Applies inner to each element of form, building up a
data structure of the same type, then applies outer to the result.
Recognizes all Clojure data structures. Consumes seqs as with doall.
On prewalk, short-circuits on Reduced. `outer` should not return Reduced.