This library is in flux. APIs may change without notice. Generated from source with koruc 0.1.7 on 9/16/2026.
Store.default
~import std/store.defaultKoru Standard Library: Reactive Stores — the `default` event.
store.default.kz · 1 tors
Koru Standard Library: Reactive Stores — the `default` event. · 15 more lines
Koru Standard Library: Reactive Stores — the `default` event.
Joined via `~part default` in store.kz; merged into the store module at load.
STORE.DEFAULT — the bare reference form as a program-wide reactive attach
std/store(enemies)
! hp h |> … // a standing rule, from anywhere
`std/store(name)` is the store's reference; `std/store(name) ! arms` attaches
those arms as standing reactive rules — a program-wide `watch`. This is a
`[pre]`-phase rewrite: it renames the bare `default` invocation to `watch`
BEFORE `create` scans for watch arms, so the entire (already-green) watch
machinery — create-time splice into the write-subflow, transplant-purity,
self-erase — handles it with no duplication. Reactive rules are top-level
only; they are standing rules, not mid-flow steps.
// Koru Standard Library: Reactive Stores — the `default` event.
// Joined via `~part default` in store.kz; merged into the store module at load.
//
// STORE.DEFAULT — the bare reference form as a program-wide reactive attach
//
// std/store(enemies)
// ! hp h |> … // a standing rule, from anywhere
//
// `std/store(name)` is the store's reference; `std/store(name) ! arms` attaches
// those arms as standing reactive rules — a program-wide `watch`. This is a
// `[pre]`-phase rewrite: it renames the bare `default` invocation to `watch`
// BEFORE `create` scans for watch arms, so the entire (already-green) watch
// machinery — create-time splice into the write-subflow, transplant-purity,
// self-erase — handles it with no duplication. Reactive rules are top-level
// only; they are standing rules, not mid-flow steps.
~[keyword|comptime|transform|pre] pub tor default {
expr: Expression,
invocation: *const Invocation,
item: std/compiler:*const Item,
program: std/compiler:*const Program,
reporter: std/compiler:*ErrorReporter,
allocator: std.mem.Allocator
} -> SiteResult