○
Planned This feature is planned but not yet implemented.
Multiline annotation block gating an import — vertical bullets + prose rationale attach to `]import`, one grammar with the inline conditional-import form.
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
~event compute { x: i32 }
| result i32
~proc compute|zig {
std.debug.print("compute({d})\n", .{x});
return .{ .result = x * 2 };
}
~event display { value: i32 }
~proc display|zig {
std.debug.print("Final: {d}\n", .{value});
}
~compute(x: 21)
| result r |> display(value: r)
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 event log { event_name: []const u8 }
~proc log|zig {
std.debug.print("[TAP] {s}\n", .{event_name});
}
~tap(input:compute -> input:display)
| result r |> log(event_name: "compute") => result { result: r }
Test Configuration
MUST_RUN
Compiler Flags:
--profile