✓
Passing This code compiles and runs correctly.
Code
// ============================================================================
// Test 507: Meta-event taps (koru:start and koru:end)
// ============================================================================
// Tests that synthesized meta-events can be tapped for program lifecycle
// observation. The compiler injects koru:start at program begin and koru:end
// at program end.
~import std/io
~import std/taps
// Simple event to prove main program runs
~tor greet { name: string }
~proc greet|zig {
std.debug.print("Hello, {s}!\n", .{name});
}
const std = @import("std");
// Tap program start - match the `done` branch explicitly
~tap(koru:start -> *)
| done |> std/io:print.ln("START: Program beginning")
// Tap program end - match the `done` branch explicitly
~tap(koru:end -> *)
| done |> std/io:print.ln("END: Program finishing")
// Main flow
~greet(name: "World")
Actual
START: Program beginning
Hello, World!
END: Program finishing
Expected output
START: Program beginning
Hello, World!
END: Program finishing
Flows
flow ~tap click a branch to expand · @labels scroll to their anchor
tap (koru: start -> *)
flow ~tap click a branch to expand · @labels scroll to their anchor
tap (koru: end -> *)
flow ~greet click a branch to expand · @labels scroll to their anchor
greet (name: "World")
Test Configuration
MUST_RUN