fuse

fuselang.org · 2026-08-01 · by Long Nguyen ·generic
A statically-typed functional language that compiles to native code through GRIN and LLVM.

fuse

Fuse

fuse

Fuse is a statically typed, purely functional language with higher-kinded types and ad-hoc polymorphism. It compiles to the GRIN whole-program optimizer, producing LLVM-generated native code.

Overview Get Started

trait Functor[A]:
    fun mapB -> Self[B];

impl List[A]: fun foldA, B -> B) -> B match l: Cons(h, t) => List::fold(t, f(z, h), f) Nil => z

fun sum(l: List[i32]) -> i32 List::fold(l, 0, (a, b) => a + b)

impl Functor[A] for List[A]: fun mapB -> List[B] List::fold(self, Nil[B], (t, h) => Cons(f(h), t))

fun fmapA, B, F: Functor -> F[B] x.map(f)

fun main() -> IO[Unit] let l = Cons(1, Cons(2, Cons(3, Nil))) let l2 = fmap(x => x * 2, l) print(int_to_str(List::sum(l2)))

Features

Statically typed

Type system based on System F with higher-order polymorphism. Algebraic data types, generics, and traits give you powerful tools to model your domain.

Purely functional

Every function in Fuse is a pure function. Pattern matching, higher-order functions, and do notation let you write expressive, composable code.

Type inference

Bidirectional type checking with support for higher-order types. Only function type signatures are required, for readability and verbosity. Everything else is inferred.

Clean syntax

Drawing inspiration from Rust, Python, Scala, and Haskell to bring a readable syntax to purely functional programming. Indentation-based blocks, lambda expressions, and ML-like syntax keep code clean and approachable.

Compiles to GRIN

Whole-program optimization through GRIN and code generation via LLVM produces fast, small native binaries with zero-cost abstractions.

Install Fuse

Get the Fuse toolchain on Linux (x86\_64) or macOS (ARM64).

`curl -fsSL https://fuselang.github.io/fuse/fuseup | sh`

fuselang.org · 1 images · 4 links

Comments (0)

No comments yet