Manuscript Documentation
v0.1.0

Scope and closure checking#

The compiler checks which names a closure captures and which cleanup actions each scope must run. It does not prove that every resource reference stays within its open lifetime. Runtime closed-state checks still matter.

Source operationRequired check
with initializerRequire the concrete, contract-view, or generic-bound proof defined by Closeable ; register the resolved operation
Scope exitIdentify exited cleanup scopes for return, loop exits, errors, faults, and cancellation
Closure creationIdentify captured bindings and snapshot them once
Assignment to captured outer localReject implicit shared mutable cells
Reassignment and branch scopeRequire initializers, enforce let/var, and keep branch-local names inside their scope

Capturing a scoped resource is not a compile error merely because it may outlive its scope. Methods report closed state at runtime. Storing or returning a reference does not transfer a cleanup action. There are no moved-binding states, borrow lifetimes, partial-move restrictions, or source task-ownership checks.

See using with , closures , and typed IR .

All values may be captured and shared. Specialized TaskGroup.start, Task.join, Scheduler.start, and HTTP serve methods are ordinary callable values. Constructors remain type constructors, not function values.