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.
8 lines
384 B
Rust
8 lines
384 B
Rust
// expect: reject E2101 E2101
|
|
// 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<F: fn(mut<u64>) -> void effects []>(value: mut<u64>) -> void effects [] { F(value); }
|
|
fn main() -> u64 effects [] { var value: u64 = 0; ref loan = value; apply::<fn set>(mut value); return *loan; }
|