Authority
Authority: refusals of capability operations as values.
Every capability operation returns Result(T, CapError) (specs/2026-11-10-object-capability-design.md ยง15). The types live in the Prelude so CapError and its constructors are bare names everywhere:
type CapLimit = ByLaunch | ByFnNeeds(String) | ByModNeeds(String)
| ByRestrict(String) | ByGrant(String)
type CapError = CapError(kind, target, limit, limit_scope)kind is the capability (IO.FileRead), target what the operation named (a path, host:port, a variable name; "" when it names nothing), limit which limit refused it and limit_scope that limit's scope list as written. Phase 1 produces only ByLaunch; the others arrive with run-time authority, restrict and dependency grants.
This module performs no operation of its own and has no needs line.
Functions
Ok(()) when the current authority admits an operation of capability kind on target, else Err(CapError(...)) naming the limit that refused it. Every stdlib entry point that performs a capability operation calls this first.
Examples
march> Authority.check("IO.Console", "stdout")
Ok(())A one-line description of a refusal: the refused operation written as a scope, the limit that refused it, and that limit's scope list.
Examples
march> Authority.describe(CapError("IO.Clock", "", ByModNeeds("Report"), "IO.Console"))
"IO.Clock refused by module Report's needs (IO.Console)"Discards a capability operation's result, refused or not. What forge fix writes where a program used an operation such as println only for its effect, in a position that needs ().
Examples
march> Authority.ignore(Ok(1))
()