Expand description
v0.30.2 (ADR 0063): the enumerable kernel-method registry.
The value methods of the built-in kernels (List/Map/Option/Result/
String/Int/Float) are dispatched by the checker in
crate::checker’s check_*_kernel_method functions, where the method
names live in match arms — authoritative for typing, but not
enumerable. This module is the enumerable view the LSP reads for .-member
completion: per-kernel (name, signature) tables and a methods_for
mapping from a receiver Ty to its methods.
The signatures are human-readable Bynk-surface display strings (generic in
the element/key/value type), for completion detail — not the checker’s
Ty-typed signatures. A drift test (kernel_registry_pins_dispatch)
drives every listed method through the real checker and asserts none is
rejected as method_not_found, so the table can’t list a phantom method.
Structs§
- Kernel
Method - One built-in kernel method: its name and a display signature.
Constants§
- BYTES_
METHODS - The
Byteskernel (v0.110, ADR 0142). Equality is an operator (D4, content compare); the kernel is length plus the String-interop bridge (D3). No ordering/arithmetic/concat/slice in v1 (deferred follow-ons). - DURATION_
METHODS - The
Durationkernel (v0.86, ADR 0112). Comparison/arithmetic are operators (D3/D4); the kernel is the explicit escape to raw milliseconds (D5). - FLOAT_
METHODS - The
Floatnumeric kernel (v0.21). - INSTANT_
METHODS - The
Instantkernel (v0.90, ADR 0114). Comparison/arithmetic are operators (D3); the kernel is the explicit escape to raw epoch milliseconds (D6). - INT_
METHODS - The
Intnumeric kernel (v0.21). - LIST_
METHODS List[T](v0.20b; v0.88 adds the ADR 0116 query/collection vocabulary).- MAP_
METHODS Map[K, V](v0.20b).- OPTION_
METHODS Option[T]combinators (v0.22a).- RESULT_
METHODS Result[T, E]combinators (v0.22a).- STRING_
METHODS - The
Stringkernel (v0.22a; UTF-16 code units, exceptchars).
Functions§
- methods_
for - The value methods of a receiver type, or
&[]for a type with no kernel methods (record/sum named types,Bool,Effect, …). Record fields are resolved separately by the LSP (they need the type declaration).