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.
(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.(args! v args)Check an explicit :quint/args. Takes the var (for the message) and the
annotation. Returns it.
An entry is a pick name, or a map building one argument out of several picks: its values name the picks, its keys name what the handler destructures. That second form is what lets a function whose own signature takes a map be annotated where it stands, instead of being wrapped.
Throws :bad-args.
Check an explicit `:quint/args`. Takes the var (for the message) and the annotation. Returns it. An entry is a pick name, or a map building one argument out of several picks: its values name the picks, its keys name what the handler destructures. That second form is what lets a function whose own signature takes a map be annotated where it stands, instead of being wrapped. Throws `:bad-args`.
(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`.
(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.
(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.
(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.
The keys :quint/state reads when it is given a map.
The keys `:quint/state` reads when it is given a map.
(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.
cljdoc builds & hosts documentation for Clojure/Script libraries
| Ctrl+k | Jump to recent docs |
| ← | Move to previous article |
| → | Move to next article |
| Ctrl+/ | Jump to the search field |