Liking cljdoc? Tell your friends :D

org.clojars.aldebogdanov.quint-connect.registry.validation

The loud half of the registry: every check that turns an annotation nobody would read into an error at driver construction.

Nothing here reflects. registry does the reading — ns-interns, meta, deref — and hands over what it found; these functions decide whether it can be used and say why not. That split is why the reflection rule still reads "confined to registry" with this namespace underneath it.

The loud half of the registry: every check that turns an annotation nobody
would read into an error at driver construction.

Nothing here reflects. `registry` does the reading — `ns-interns`, `meta`,
`deref` — and hands over what it found; these functions decide whether it can
be used and say why not. That split is why the reflection rule still reads
"confined to `registry`" with this namespace underneath it.
raw docstring

annotated!clj

(annotated! ns-sym key-ns annotated)

Assert that a scanned namespace carried annotations at all. Takes the namespace symbol, the qualifier, and what the scan found. Returns nil.

Throws :empty-scan, naming the ^{...} (defn ...) trap, which is silent in Clojure itself and is what this is nearly always about.

Assert that a scanned namespace carried annotations at all. Takes the
namespace symbol, the qualifier, and what the scan found. Returns nil.

Throws `:empty-scan`, naming the `^{...} (defn ...)` trap, which is silent in
Clojure itself and is what this is nearly always about.
sourceraw docstring

args!clj

(args! v args)

Check an explicit :quint/args. Takes the var (for the message) and the annotation. Returns it.

:quint/args is a vector, one entry per argument, and each entry is the shape of that argument with pick names where its values go — the exact inverse of the destructuring the handler performs on it:

handler                        :quint/args
[who amount]                   [:who :amount]
[{:keys [from to]}]            [{:from :src :to :dst}]
[[x y]]                        [[:x :y]]
[{:keys [pos]}]                [{:pos [:x :y]}]
[[{:keys [a]} b]]              [[{:a :pa} :b]]

A pick name is a leaf; vectors and maps nest as deeply as the handler takes them apart. Map keys are literal, map values are shapes in their own right.

Throws :bad-args.

Check an explicit `:quint/args`. Takes the var (for the message) and the
annotation. Returns it.

`:quint/args` is a vector, one entry per argument, and each entry is the
**shape of that argument** with pick names where its values go — the exact
inverse of the destructuring the handler performs on it:

    handler                        :quint/args
    [who amount]                   [:who :amount]
    [{:keys [from to]}]            [{:from :src :to :dst}]
    [[x y]]                        [[:x :y]]
    [{:keys [pos]}]                [{:pos [:x :y]}]
    [[{:keys [a]} b]]              [[{:a :pa} :b]]

A pick name is a leaf; vectors and maps nest as deeply as the handler takes
them apart. Map keys are literal, map values are shapes in their own right.

Throws `:bad-args`.
sourceraw docstring

matchable!clj

(matchable! ns-sym key-ns driver-key scoped)

Assert that no annotation is scoped to a driver this one cannot be matched against. Takes the namespace symbol, the qualifier, the driver key as written, and the scoped vars the scan found. Returns nil.

A scoped annotation asks a question an unnamed driver cannot answer, and guessing it either way is the silence this design refuses.

Throws :unnamed-driver.

Assert that no annotation is scoped to a driver this one cannot be matched
against. Takes the namespace symbol, the qualifier, the driver key as
written, and the scoped vars the scan found. Returns nil.

A scoped annotation asks a question an unnamed driver cannot answer, and
guessing it either way is the silence this design refuses.

Throws `:unnamed-driver`.
sourceraw docstring

no-duplicates!clj

(no-duplicates! error what pairs)

Assert that no two vars claim the same name. Takes the error keyword, the word for what is claimed, and [name entry] pairs whose entries carry a :var. Returns nil. Throws the given error, naming every var involved.

Assert that no two vars claim the same name. Takes the error keyword, the
word for what is claimed, and `[name entry]` pairs whose entries carry a
`:var`. Returns nil. Throws the given error, naming every var involved.
sourceraw docstring

onlyclj

(only error k found)

The single lifecycle annotation of its kind in the whole scan, or nil.

Two of them is an error rather than first-one-wins. The loser would simply never run, and an init that never runs is the worst shape a failure can take here: it surfaces as a divergence in some later trace, at a step that has nothing to do with the var that was skipped.

Takes the error keyword, the annotation key as written, and the entries found. Throws the given error, naming both vars.

The single lifecycle annotation of its kind in the whole scan, or nil.

Two of them is an error rather than first-one-wins. The loser would simply
never run, and an `init` that never runs is the worst shape a failure can
take here: it surfaces as a divergence in some later trace, at a step that
has nothing to do with the var that was skipped.

Takes the error keyword, the annotation key as written, and the entries
found. Throws the given error, naming both vars.
sourceraw docstring

pick-names!clj

(pick-names! v arglists)

The pick names an action's arglist declares, in argument order.

Takes the var (for the message) and its :arglists. Returns a vector of keywords.

Every parameter is a pick name, looked up in the picks map by that name, so a parameter with no name to look up would arrive as nil on every step — a divergence with no cause attached to it, which is the silence this layer exists to prevent.

Throws :ambiguous-arity for a multi-arity var, and :bad-arglist for a destructuring parameter, a rest parameter, or no :arglists at all.

The pick names an action's arglist declares, in argument order.

Takes the var (for the message) and its `:arglists`. Returns a vector of
keywords.

Every parameter is a pick name, looked up in the picks map by that name, so a
parameter with no name to look up would arrive as nil on every step — a
divergence with no cause attached to it, which is the silence this layer
exists to prevent.

Throws `:ambiguous-arity` for a multi-arity var, and `:bad-arglist` for a
destructuring parameter, a rest parameter, or no `:arglists` at all.
sourceraw docstring

state-keysclj

The keys :quint/state reads when it is given a map.

The keys `:quint/state` reads when it is given a map.
sourceraw docstring

state-spec!clj

(state-spec! v spec)

What :quint/state carries, as a map. Takes the var (for the message) and the annotation. A bare keyword names the spec variable; a map may add :path, a vector of keys applied with get-in after the value is read. Returns the map form.

Throws :bad-state-spec for anything that would leave part of the annotation unread: an unknown key, a missing :var, or a :path that is not a vector.

What `:quint/state` carries, as a map. Takes the var (for the message) and
the annotation. A bare keyword names the spec variable; a map may add
`:path`, a vector of keys applied with `get-in` after the value is read.
Returns the map form.

Throws `:bad-state-spec` for anything that would leave part of the annotation
unread: an unknown key, a missing `:var`, or a `:path` that is not a vector.
sourceraw docstring

cljdoc builds & hosts documentation for Clojure/Script libraries

Keyboard shortcuts
Ctrl+kJump to recent docs
Move to previous article
Move to next article
Ctrl+/Jump to the search field
× close