051 scope docs render

✓ Passing This code compiles and runs correctly.

Code

input.k

Supporting Files

doclib/res.kz

Actual

pub tor mint {} -> *Res<opened!> — Mint a Res — hands back a live handle token.
pub tor grab { r: *Res<opened> } — Read the resource — borrows the token.
pub tor release { r: *Res<!opened> } — Release the resource — spends the token for good.
{"kind":"koru/scope-manifest","version":1,"scope":"docs","events":[{"name":"mint","cost":1,"home":"doclib.res","args":[],"creates":[{"obligation":"opened","module":"doclib.res","field":"__type_ref","resource_type":"Res"}],"discharges":[],"branches":[{"name":"ok","optional":false,"fields":[{"name":"__type_ref","type":"*Res<opened!>","optional":false}]}],"doc":"Mint a Res — hands back a live handle token.\u000aThe token is opaque: pass it to verbs that borrow or discharge it."},{"name":"grab","cost":1,"home":"doclib.res","args":[{"name":"r","type":"*Res","optional":false,"phantom":"opened"}],"creates":[],"discharges":[],"branches":[],"doc":"Read the resource — borrows the token."},{"name":"release","cost":1,"home":"doclib.res","args":[{"name":"r","type":"*Res","optional":false,"phantom":"!opened"}],"creates":[],"discharges":[{"obligation":"opened","module":"doclib.res","arg":"r"}],"branches":[],"doc":"Release the resource — spends the token for good."}],"includes":[],"doc":""}

Expected output

pub tor mint {} -> *Res<opened!> — Mint a Res — hands back a live handle token.
pub tor grab { r: *Res<opened> } — Read the resource — borrows the token.
pub tor release { r: *Res<!opened> } — Release the resource — spends the token for good.
{"kind":"koru/scope-manifest","version":1,"scope":"docs","events":[{"name":"mint","cost":1,"home":"doclib.res","args":[],"creates":[{"obligation":"opened","module":"doclib.res","field":"__type_ref","resource_type":"Res"}],"discharges":[],"branches":[{"name":"ok","optional":false,"fields":[{"name":"__type_ref","type":"*Res<opened!>","optional":false}]}],"doc":"Mint a Res — hands back a live handle token.\u000aThe token is opaque: pass it to verbs that borrow or discharge it."},{"name":"grab","cost":1,"home":"doclib.res","args":[{"name":"r","type":"*Res","optional":false,"phantom":"opened"}],"creates":[],"discharges":[],"branches":[],"doc":"Read the resource — borrows the token."},{"name":"release","cost":1,"home":"doclib.res","args":[{"name":"r","type":"*Res","optional":false,"phantom":"!opened"}],"creates":[],"discharges":[{"obligation":"opened","module":"doclib.res","arg":"r"}],"branches":[],"doc":"Release the resource — spends the token for good."}],"includes":[],"doc":""}

Flows

flow ~register click a branch to expand · @labels scroll to their anchor
register (scope: "docs", source: doclib.res:mint -> mint(1) doclib.res:grab -> grab(1) doclib.res:release -> release(1))
flow ~scope-vocabulary click a branch to expand · @labels scroll to their anchor
scope-vocabulary (name: "docs")
flow ~scope-manifest click a branch to expand · @labels scroll to their anchor
scope-manifest (name: "docs")

Test Configuration

MUST_RUN

koru.json: