Skip to content

Typed programs.
Resilient systems.

Gale brings static types to the BEAM, compiling to readable Elixir that belongs in your existing Mix application.

Model your data with unions and structs. Handle every case. Describe the messages your processes receive. Let the compiler check the connections before your application starts.

pub type Job = Queued(id: Integer) | Running(id: Integer) | Finished
pub fn describe(job: Job) -> Binary {
match job {
Queued(id) -> "Job #{id} is waiting"
Running(id) -> "Job #{id} is running"
Finished -> "All done"
}
}

Elixir interop. Generated modules are ordinary Elixir. Use Mix, OTP, and existing libraries through explicit typed interfaces.

Types for concurrent systems. Typed mailboxes and OTP behaviours make process protocols visible in the code. Supervision keeps its native BEAM semantics.

Built for readable changes. Explicit public signatures and compiler errors give people and coding agents concrete feedback as a codebase grows.

Gale is under active development. Start with this repository’s Dev Container, which includes the compiler and the Elixir toolchain:

Terminal window
git clone https://github.com/mvkvc/gale_std.git
cd gale
# Open in VS Code → Dev Containers: Reopen in Container

Then run an example:

Terminal window
cd examples/numbers
mix test

Follow the tour, read the language reference, or explore typed JSON schemas. Every tour chapter has a matching, tested example project.