cli: add explicit built-in error values

Add the error_values feature and error.const through specification, AIR,
verification, interpretation and source lowering. Error values are Copy data
with no allocation, effects or authority. Keep enum.make semantics frozen.

Cover all registered tags, feature negotiation, payload/type errors and
authority rejection in AIR/source; verify canonical and hosted CLI behavior.
Record reference-bundle costs and the map preflight-validation prerequisite.
This commit is contained in:
dev committed 2026-10-07 08:09:49 +03:00
1 parent 89c63c306b
commit 1eaf968f4f
56 files changed
+823 -4

No files matched your search

+7
View File
@@ -30,6 +30,7 @@ Status values: `open`, `resolved`.
| Q-025 | resolved | STD-5 | Array construction from complete element values |
| Q-035 | resolved | STD-5 | Whole-value linear aggregates |
| Q-036 | resolved | STD-6a | Dynamic initialized linear buffer storage and drain |
| Q-038 | resolved | STD-6d.2 | Pure construction of built-in errors |
## Q-001 — Text AIR grammar
@@ -274,3 +275,9 @@ STD-5 intentionally enables only complete fixed-size values and individually own
HashMap<K,V> needs a stable hash/equality pair: equal keys must hash equally, while hash collisions must still compare actual keys. Current Copy/Send/Share/Freeze/Local constraints supply no user operations; type parameters cannot carry callbacks or values (spec 15 §15). Struct/byte-key equality, key ownership and effect-visible callable policies have no general source contract. A hash digest alone cannot represent original-key identity.
**Open for general keys.** The [owning map proposal](hash-map.md) starts with an honest U64Map<V> specialization, exact numeric equality and existing safe primitives. This does not complete the HashMap<Key, Own<Value>> collection gate. General key support must either use an independently specified concrete representation or justify a generally useful vertical language facility; it must not silently infer hashing/equality or introduce map-only compiler magic.
## Q-038 — Pure construction of built-in errors
STD-6d.2 needs to return allocation-size validation failure without allocating. Existing built-in errors were obtainable only from fallible runtime operations.
**Resolved (RFC 0027 branch implementation):** spec 05 §14 adds feature `error_values` and pure `error.const B.variant`; source reuses `B::variant`. Every registered payload-free error variant is ordinary Copy data, never authority. Existing `enum.make` and runtime outcome rules are unchanged.