Skip to main content

Module capability

Module capability 

Source
Expand description

The capability vocabulary (§5.4): the payload-free names of the structural properties the compiler decides about a type.

This is deliberately the names and nothing else. A capability that carries a type — Iterable(T, Item), HasMethod(name, params, result) — lives in praxis_typeck::constraint, which can name a Type; this crate cannot, and should not, because the method catalog’s type patterns are written here and a pattern is not a type.

§5.4 forbids surfacing any of these names to the user. A diagnostic says what the program did and why it cannot work — “a Vec can change after it is stored, so it cannot be found again as a key” — never “does not satisfy HashStable”, never “capability”, never “trait”. The wording lives in praxis_hir::diagnostics.

Enums§

CapKind
One structural property a type either has or does not (§5.4, §5.5).