✓
Passing This code compiles and runs correctly.
Code
// Pins the multiline annotation block attaching to an import — one grammar
// with the inline form (310_027/029 pin inline `[profile]import`): bullets
// are the annotation entries, prose lines are human rationale (discarded by
// the parser, kept for the reader), and the entries gate the import exactly
// as they would inline.
//
// The imported module registers a tap, so the import is load-bearing: the
// [TAP] line in the output IS the import surviving the gate. Run with
// --profile (COMPILER_FLAGS), so the gate must KEEP the import.
const std = @import("std");
~[
- profile
Tracing is opt-in; the tracer module only rides along when asked for.
]import app/test_lib/tracer
~tor compute { x: i32 } -> i32
~proc compute|zig {
std.debug.print("compute({d})\n", .{x});
return x * 2;
}
~tor display { value: i32 }
~proc display|zig {
std.debug.print("Final: {d}\n", .{value});
}
~compute(x: 21): r |> display(value: r)
Actual
compute(21)
[TAP] compute
Final: 42
Expected output
compute(21)
[TAP] compute
Final: 42
Flows
flow ~compute click a branch to expand · @labels scroll to their anchor
compute (x: 21)
Imported Files
// Tap module — importing it is what wires the tap (the 310_001 mechanism).
// The pin's gated import makes that wiring conditional: this module's output
// appears exactly when the import survives the annotation gate.
const std = @import("std");
~import std/taps
~pub tor log { event_name: string }
~proc log|zig {
std.debug.print("[TAP] {s}\n", .{event_name});
}
// compute is a bare-return `-> T` event, so the tap binds the produced value
// with `: r` (call-site bind rule, Lars-ruled 2026-06-25; 310_001 is the green
// precedent) — a branch tap has no named branch to match on a bare return.
~tap(input:compute -> input:display): r |> log(event_name: "compute")
Test Configuration
MUST_RUN
Compiler Flags:
--profile