Effects and I/O¶
Li tracks effects explicitly — what a procedure is allowed to do besides pure computation.
Common effects¶
| Effect | Meaning |
|---|---|
raises IO | Console, files, environment |
raises Alloc | Heap allocation (list, dict, …) |
raises DivZero | Division can fail |
raises Async | Async/await (roadmap) |
Declaring effects¶
A procedure that uses I/O without raises IO fails to compile.
Trusted I/O axioms¶
Low-level I/O is axiomatized in docs/semantics/trusted.lean. User code proves against those axioms; it does not redefine them.
extern procedures¶
Links to C symbols when building.
Command-line args (runtime)¶
The runtime may expose argc/argv helpers (li_rt_argc, li_rt_argv) for drivers and benchmarks.
Tests: li-tests/effects/, li-tests/runtime/.