Skip to content

Compile-time correctness on the BEAM.

Gale is a statically typed language that compiles to readable Elixir. Build concurrent applications with compile-time type safety and direct access to Elixir’s libraries and OTP.

Model your data with unions and structs. Gale checks that each case handles every case. Add a new state, and the compiler shows you which matches need to change.

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

Use your Elixir libraries. Add Gale to a Mix project and call existing libraries through typed interfaces. Call generated Gale modules from Elixir like any other module.

Describe your messages. Typed mailboxes define what a process can receive. OTP behaviours connect requests to reply types and check callback signatures. Your processes run under native OTP supervision.

Check data at the boundary. Decode incoming JSON into typed values and represent expected failures with Result. Handle success and failure explicitly in your code.

Gale is under active development. Follow the Quick Start to add it to a Mix project, or explore the examples in the repository’s Dev Container, which includes the compiler and Elixir toolchain:

Terminal window
git clone https://github.com/cloudloom-ai/gale.git
cd gale
# Open in VS Code, then Dev Containers: Reopen in Container

Inside the container, run an example:

Terminal window
cd examples/numbers
mix deps.get
mix test

The tour walks through the language with runnable, tested examples, including proving contracts. The language reference lists the supported syntax, while the type system gives the formal rules.