○
Planned This feature is planned but not yet implemented.
OWED: std/store:kind + pooled set — kinds have no storage; the set owns capacity; shared leaves fold.
Failure Output
Showing last 10 of 14 lines
--> tests/regression/600_STDLIB/690_STORE/690_296_set_pools_kinds_folds_shared_leaf/input.k:50:0
error[KORU161]: std/store:query(Entities): unknown plural store - no std/store:new(Entities, capacity: N) found (query reads a plural container's live rows)
--> tests/regression/600_STDLIB/690_STORE/690_296_set_pools_kinds_folds_shared_leaf/input.k:52:0
error[KORU161]: std/store:query(Entities): unknown plural store - no std/store:new(Entities, capacity: N) found (query reads a plural container's live rows)
--> tests/regression/600_STDLIB/690_STORE/690_296_set_pools_kinds_folds_shared_leaf/input.k:55:0
error[KORU161]: std/store:query(Entities): unknown plural store - no std/store:new(Entities, capacity: N) found (query reads a plural container's live rows)
--> tests/regression/600_STDLIB/690_STORE/690_296_set_pools_kinds_folds_shared_leaf/input.k:58:0 Code
// ASPIRATIONAL (design capture 2026-09-06 — red until the surface lands).
// The `set` surface as designed: a POOL over `kind` declarations. A kind is
// shape + kind identity with NO storage and NO capacity slot; the set owns
// the capacity; inserts route through the kind (the kind name IS the kind);
// shared leaves fold into one contiguous extent, private leaves per-kind.
// The current implementation of `set` is a view over new stores (sequential
// loops, no shared extent) — this test pins the TARGET, not that behavior.
// Flips green when `std/store:kind` + the pooled `std/store:set` land.
// DEPENDENCY (Lars, 2026-09-06): the kind layer is an ABSTRACT/VIRTUAL shape
// — `kind(Player)` declares shape + identity with no storage, and the pooled
// set's dispatch (inserts route through the kind; queries dispatch over kind
// identities) needs that abstract/virtual machinery, not just a fold. There
// is no abstract/virtual surface in the language today; the set waits on it.
// Currently red: `no std/store:new(Player) found` — today's `set` is a view
// over new stores, and the pool's `kind` declarations have no `new` to
// resolve. Output is identical to 690_287 (same program, new surface).
// WHEN `std/store:kind` LANDS, mint alongside (ruled in DESIGN.md, unpinnable
// until the surface exists): kind(Player) + new(Player) refused (one binding
// per name); claims take layer-1 declarations only (no set-in-set); set/union/
// view each need >= 2 members. Open ruling to settle with the set: flat pool
// (per-row tag) vs per-kind segmentation (no tag, split extent) — the flat
// end's coexistence tax is measured vs the view in the 006 benchmark.
import std/io
import std/proto
import std/store
std/proto:i64(Strength)
std/proto:i64(Mana)
std/proto:i64(Armor)
std/proto(Player) {
str: Strength
mana: Mana
}
std/proto(Enemy) {
str: Strength
armor: Armor
}
std/store:kind(Player) { Player }
std/store:kind(Enemy) { Enemy }
std/store:set(Entities, capacity: 16) {
Player
Enemy
}
std/store:insert(Player) { str: 18, mana: 12 }
std/store:insert(Enemy) { str: 10, armor: 5 }
std/store:query(Entities)
! query e |> std/io:print.ln("entity {{ e.str:d }}")
std/store:query(Entities)
! query e when e is Player |> std/io:print.ln("player {{ e.str:d }} {{ e.mana:d }}")
std/store:query(Entities)
! query e when e is Enemy |> std/io:print.ln("enemy {{ e.str:d }} {{ e.armor:d }}")
Expected output
entity 18
entity 10
player 18 12
enemy 10 5
Flows
flow ~i64 click a branch to expand · @labels scroll to their anchor
i64 (expr: Strength)
flow ~i64 click a branch to expand · @labels scroll to their anchor
i64 (expr: Mana)
flow ~i64 click a branch to expand · @labels scroll to their anchor
i64 (expr: Armor)
flow ~std/proto click a branch to expand · @labels scroll to their anchor
std/proto (Player, source: str: Strength
mana: Mana)
flow ~std/proto click a branch to expand · @labels scroll to their anchor
std/proto (Enemy, source: str: Strength
armor: Armor)
flow ~kind click a branch to expand · @labels scroll to their anchor
kind (Player, source: Player)
flow ~kind click a branch to expand · @labels scroll to their anchor
kind (Enemy, source: Enemy)
flow ~set click a branch to expand · @labels scroll to their anchor
set (Entities, capacity: 16, source: Player
Enemy)
flow ~insert click a branch to expand · @labels scroll to their anchor
insert (Player, source: str: 18, mana: 12)
flow ~insert click a branch to expand · @labels scroll to their anchor
insert (Enemy, source: str: 10, armor: 5)
flow ~query click a branch to expand · @labels scroll to their anchor
query (Entities)
flow ~query click a branch to expand · @labels scroll to their anchor
query (Entities)
flow ~query click a branch to expand · @labels scroll to their anchor
query (Entities)
Test Configuration
MUST_RUN