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.
Capabilities
Turmeric compiles to native code with whole-program optimization. Incremental builds are fast by design — spend more time writing, less time waiting.
sub-second buildsAd-hoc polymorphism with zero-cost dispatch. Define interfaces, implement them for any type, and let the compiler verify everything.
Functor · Monad · FoldableModel side effects as first-class values. Compose, intercept, and resume them with handlers — no monad transformers required.
defeffect · perform · handleExhaustive pattern matching on algebraic data types defined with defdata and generalized with defgadt. Every case is handled.
Delimited continuations with reset and shift let you encode coroutines, generators, and advanced control flow as ordinary library code.
A compile-time macro system with quasiquote and unquote. Extend the language with new syntax without sacrificing readability.
defmacro · quasiquoteTypeclasses
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.
Algebraic Effects
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.
Spice Package Manager
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.
Performance
Turmeric compiles to optimized native code. Functional programming without the performance tax.
Get Started
Installs tur via the Homebrew formula. Requires Homebrew. Or build from source — see the GitHub repo.
Creates a project with sensible defaults, a package manifest, and a hello world entry point.
Return types are annotated with :int, :bool, or :cstr. The compiler catches type errors before you run.
The Spice registry hosts packages for HTTP, JSON, databases, parsing, and more — all with effect-typed APIs.
Try Turmeric in your browser — no install required.