Now in public alpha — v0.1.0

A taste of
functional programming

Lightning-fast, expressive, and a joy to write.

Turmeric brings typeclasses, algebraic effects, and pattern matching to a Lisp-inspired syntax. Fast to compile, safe to run, delightful to read.

Install via curl -sSf https://install.turmeric-lang.com | sh
effects.tur
;; Algebraic effects in Turmeric (defeffect Ask [] :int) (defn use-ask [] :int (+ 1 (perform (Ask)))) (println (handle (use-ask) (Ask [] k) (resume k 41)))
Inspired by
Clojure · Racket · Haskell · Koka · Effekt

Capabilities

Everything you need,
nothing you don't.

Lightning Compilation

Turmeric compiles to native code with whole-program optimization. Incremental builds are fast by design — spend more time writing, less time waiting.

sub-second builds
🎯
Typeclasses

Ad-hoc polymorphism with zero-cost dispatch. Define interfaces, implement them for any type, and let the compiler verify everything.

Functor · Monad · Foldable
Algebraic Effects

Model side effects as first-class values. Compose, intercept, and resume them with handlers — no monad transformers required.

defeffect · perform · handle
Pattern Matching

Exhaustive pattern matching on algebraic data types defined with defdata and generalized with defgadt. Every case is handled.

match · defdata · defgadt
Continuations

Delimited continuations with reset and shift let you encode coroutines, generators, and advanced control flow as ordinary library code.

reset · shift · delimited
Macro System

A compile-time macro system with quasiquote and unquote. Extend the language with new syntax without sacrificing readability.

defmacro · quasiquote

Polymorphism
that scales.

Define behavior once, use it everywhere. Turmeric's typeclass system handles dispatch at compile time — no virtual tables, no runtime cost.

Write instances for any type with complete type inference. Typeclass constraints keep your functions general without losing precision.

typeclasses.tur
(defclass Show [a] (show [x] :cstr)) (defclass Eq [a] (eq? [x y] :bool)) (defdata Color (Red) (Green) (Blue)) (definstance Eq [int] (eq? [x y] (= x y))) ;; Typeclass constraint -- requires Show instance (defn display [^Show a x] :void (println (show x))) ;; Pattern match on ADTs (defn color-name [c] :cstr (match c (Red) "red" (Green) "green" (Blue) "blue"))

Side effects,
tamed.

Declare what your functions can do, not how they do it. Handlers let you swap implementations — test, log, mock — without touching your core logic.

Compose effects freely. The type system ensures you never forget to handle one.

effects.tur
(defeffect Ask [] :int) ;; Business logic -- no mention of *how* Ask works (defn compute [x] :int (+ x (perform (Ask)))) ;; Production: supply real value (defn run-prod [program] :int (handle program (Ask [] k) (resume k 41))) ;; Test: supply fixed value -- no mocking frameworks (defn run-test [program] :int (handle program (Ask [] k) (resume k 0))) (println (run-prod (compute 1))) ;; => 42 (println (run-test (compute 1))) ;; => 1

Packages, meet
simplicity.

One build.tur file declares your package and all its dependencies -- called spices. Git URLs are all you need. No separate package manager binary, no CMake required.

Need a C library? Add it to :cmake-deps and Turmeric handles the rest -- fetching, building, and linking automatically.

build.tur
(defpackage my-app :name "my-app" :version "0.1.0" ;; Turmeric dependencies -- called spices :spices { "geom" {:url "https://github.com/alice/tur-geom" :ref "v0.2.1"} "math" {:url "https://github.com/bob/tur-math" :ref "v1.5.0"} } ;; C/CMake dependencies (CPM-compatible) :cmake-deps { "raylib" {:url "https://github.com/raysan5/raylib" :ref "5.0"} })

Performance

Speed that doesn't compromise.

Turmeric compiles to optimized native code. Functional programming without the performance tax.

1.2ms
Median cold compile time
for a 1000-line module
vs 18ms in Haskell (GHC)
0ns
Typeclass dispatch overhead
at runtime
fully resolved at compile time
2.1×
Faster than equivalent
Clojure on numeric workloads
native LLVM IR, no JVM overhead

Get Started

Up and running
in minutes.

01 — Install
One command install
curl -sSf https://install.turmeric-lang.com | sh

Installs tur via the Homebrew formula. Requires Homebrew. Or build from source — see the GitHub repo.

02 — New Project
Scaffold a project
turmeric new my-project cd my-project turmeric run

Creates a project with sensible defaults, a package manifest, and a hello world entry point.

03 — Write Code
Your first function
(defn factorial [n] :int (if (<= n 1) 1 (* n (factorial (- n 1))))) (println (factorial 10)) ;; => 3628800

Return types are annotated with :int, :bool, or :cstr. The compiler catches type errors before you run.

04 — Add Packages
Rich package ecosystem
turmeric add spice/http turmeric add spice/json turmeric add spice/postgres

The Spice registry hosts packages for HTTP, JSON, databases, parsing, and more — all with effect-typed APIs.

Ready to add some
spice to your stack?

Try Turmeric in your browser — no install required.