Skip to content

Typed native systems, without runtime ceremony.

Yona is a strict, compiled functional language for people who care about inference, explicit effects, deterministic resource lifetimes, and LLVM native code generation.
type Result a e = Ok a | Err e
describe result =
case result of
Ok value -> "value: {value}"
Err error -> "error: {error}"
end

Yona 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 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 () in
handle readState ()
with
State.get () resume -> resume "# test configuration"
return value -> value
end

The 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.

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.

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.

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.