✓
Passing This code compiles and runs correctly.
Code
// MIRROR of 690_075_store_cross_store_row_index: `std/store:take` indexed by a
// cell of a DIFFERENT store, both stores owned by the imported module.
//
// take discharges a row's obligation, and the index `todos[ui.sel]` has to
// lower against two separately synthesized stores that share one module home.
// The singular and plural store paths meet here, which is where a fix that
// converted only one of them would show.
import app/lib
app/lib:run()
Supporting Files
//
// `ui.sel` HOLDS A HANDLE, not a row position — ruled 2026-08-02. It was the
// literal 0 until then, which only addressed a row because the handle-validity
// wall was off for the first store declared (690_242). Position is not identity
// (O10.iii): a take swap-removes the last row into the freed slot, so an offset
// names a different row afterwards while a handle names the same one or traps.
// The handle comes from `| row`, the only place one is minted.
import std/io
import std/store
std/store:new(todos, capacity: 8) { done: i64 }
std/store:new(ui) { sel: -1[i64] }
pub tor run {}
run = std/store:insert(todos) { done: 0 }
| row r |> std/store:stored { ui.sel: r }
|> std/store:stored { todos[ui.sel].done: 1 }
|> std/store:take(todos[ui.sel])
| item gone |> std/io:print.ln("done {{ gone.done:d }}")
| empty |> std/io:print.ln("empty")
Actual
done 1
Expected output
done 1
Flows
flow ~run click a branch to expand · @labels scroll to their anchor
run
Test Configuration
MUST_RUN