Typed native systems, without runtime ceremony.
type Result a e = Ok a | Err e
describe result = case result of Ok value -> "value: {value}" Err error -> "error: {error}" endYona keeps the language surface small: immutable values, algebraic data types, pattern matching, typed effects, and modules. The compiler supplies the rest: type inference, coverage analysis, ownership checks, and lowering to LLVM.
Effects have a boundary
Section titled “Effects have a boundary”Effects are operations a program performs, not ambient permission to reach into the machine. A handler chooses their implementation, which makes tests and production policies explicit:
let readState = \() -> perform State.get () inhandle readState ()with State.get () resume -> resume "# test configuration" return value -> valueendThe caller supplies the policy rather than the computation assuming ambient state. The compiler reports unhandled operations before an executable is produced. Read the effects guide for the model and its current surface.
Resources are values with lifetimes
Section titled “Resources are values with lifetimes”Files, sockets, and channel endpoints are linear values. with scopes a
resource and consumes it exactly once, including when control leaves early:
import tcpConnect from Std\Net, send from Std\Net in
with connection = tcpConnect "localhost" 8080 in send connection "hello"This is ownership visible in the source, checked by the compiler, and backed by native reference counting rather than a tracing collector. See memory and linearity.
Native code is the default deployment
Section titled “Native code is the default deployment”Yona compiles ahead of time through LLVM to object files and executables. Its runtime uses ownership transfer, structural sharing, and uniqueness-based updates for persistent collections. Independent work can be expressed without thread-pool plumbing:
import readFile from Std\File in
let files = ["config.toml", "schema.json", "ca.pem"] in[| readFile file for file = files ]For systems that need it, the standard library also exposes typed tasks, channels, platform I/O, and optional Vulkan-backed accelerators. Start with the language specification or the quick start.
Use Yona from CMake
Section titled “Use Yona from CMake”The installed package includes yonac, the runtime and standard library, plus
an imported compiler target and CMake helpers. A downstream project only needs:
find_package(Yona CONFIG REQUIRED)yona_add_executable(report SOURCE Report.yona)The resulting CMake target builds with the packaged compiler and sysroot; no shell command or machine-global include path is involved. See CMake integration for modules, dependencies, and target properties.
Yona is free software under the GPLv3. Development happens on GitHub.