Bind typed source functions with exact effect contracts during deterministic specialization; retain nominal operation identity and ordinary AIR verification. Add spec/RFC/grammar, checked Quick Reference examples, source/AIR conformance, package/hosted CLI tests, scheduler/GC coverage and documentation budgets.
9 lines
369 B
Rust
9 lines
369 B
Rust
// expect: run
|
|
// result: 42
|
|
// phase: 6
|
|
// spec: docs/spec/15-source-language.md §18
|
|
module test.static_functions
|
|
fn set(value: mut<u64>) -> void effects [] { *value = 42; }
|
|
fn apply<T, F: fn(mut<T>) -> void effects []>(value: mut<T>) -> void effects [] { F(value); }
|
|
fn main() -> u64 effects [] { var value: u64 = 0; apply::<u64, fn set>(mut value); return value; }
|