✓
Passing This code compiles and runs correctly.
Code
// RULING GUARD (2026-09-11): the explicit rebind stays legal.
//
// The advance removes the COMPULSION to rebind; it does not forbid the rebind.
// `advance(h): h2 |> close(h: h2)` names the re-minted handle and is still the
// conservative, no-shadowing-respecting spelling. A future narrowing that
// refuses it — e.g. a KORU115-style retirement of the unambiguous rebind — must
// break this pin. See concepts/frag-a-consumed-handle-should-continue-its-binding.
import app/held
import std/io
app/held:open()
| opened h |> app/held:advance(h): h2 |> app/held:close(h: h2) |> std/io:print.ln("explicit rebind, in place")
| err e |> std/io:print.ln("err: {{ e:s }}")
Supporting Files
// A held resource whose state ADVANCES on the same handle — the shape raylib's
// window uses (opened -> active), reduced to its minimum. `advance` consumes
// <!open|!active> and re-mints <active!> on the SAME pointer (`-> h` is the
// transition written out); nothing here needs a second symbol.
const std = @import("std");
pub const Handle = struct { _token: u8 };
~pub tor open { }
| opened *Handle<open!>
| err string
~proc open|zig {
const h = std.heap.page_allocator.create(Handle) catch unreachable;
h.* = Handle{ ._token = 0 };
return .{ .opened = h };
}
~pub tor advance { h: *Handle<!open|!active> } -> *Handle<active!>
~advance -> h
~pub tor close { h: *Handle<!active> }
~proc close|zig {
std.heap.page_allocator.destroy(h);
}
Actual
explicit rebind, in place
Expected output
explicit rebind, in place
Flows
flow ~open click a branch to expand · @labels scroll to their anchor
open
Test Configuration
MUST_RUN