Fuse Programming Language<br>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.<br>Overview<br>Get Started
trait Functor[A]:<br>fun map[B](self, f: A -> B) -> Self[B];
impl List[A]:<br>fun fold[A, B](l: List[A], z: B, f: (B, A) -> B) -> B<br>match l:<br>Cons(h, t) => List::fold(t, f(z, h), f)<br>Nil => z
fun sum(l: List[i32]) -> i32<br>List::fold(l, 0, (a, b) => a + b)
impl Functor[A] for List[A]:<br>fun map[B](self, f: A -> B) -> List[B]<br>List::fold(self, Nil[B], (t, h) => Cons(f(h), t))
fun fmap[A, B, F: Functor](f: A -> B, x: F[A]) -> F[B]<br>x.map(f)
fun main() -> IO[Unit]<br>let l = Cons(1, Cons(2, Cons(3, Nil)))<br>let l2 = fmap(x => x * 2, l)<br>print(int_to_str(List::sum(l2)))
Features<br>Statically typed<br>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<br>Every function in Fuse is a pure function. Pattern matching, higher-order functions, and do notation let you write expressive, composable code.
Type inference<br>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<br>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<br>Whole-program optimization through GRIN and code generation via LLVM produces fast, small native binaries with zero-cost abstractions.
Install Fuse<br>Get the Fuse toolchain on Linux (x86_64) or macOS (ARM64).<br>curl -fsSL https://fuselang.github.io/fuse/fuseup | sh<br>{this.querySelector(".icon-copy").style.display="inline",this.querySelector(".icon-check").style.display="none"},1500)' aria-label="Copy to clipboard">