"For God so loved the world that he gave his only begotten Son, that whoever believes in him should not perish but have eternal life." -- John 3:16

Haskelujah

Everything you need to develop, build, and ship Haskell

Compiler, package manager, script runner, REPL, test runner, AI integration, and a Haskell-extensible editor — all in one binary. Install once. No GHC, no Stack, no LLVM required.

cargo install haskelujah#!/usr/bin/env haskelujahCompiler + Package ManagerREPL + LSP + Test RunnerAI / MCP IntegrationCranelift · LLVM · Wasm
Latest proof 2,500+ passing tests

510/513 curated, 43 CL + 82 LLVM roundtrips, 833/938 GHC typecheck (88.8%).

Hackage packages 16 packages compile

comonad, exceptions, void, distributive, semigroupoids, data-default, safe, vector, call-stack, and more. Cross-package resolution enabled.

88.8% GHC Compatibility 833 / 938 tests
363 Module Interfaces Synthetic Haskell module interfaces
2,500+ Passing Tests 512/513 curated, 43 CL + 82 LLVM roundtrips
20 Hackage Packages transformers + mtl + parsec + deepseq + vector + 15 more

Everything you need

Compiler, package manager, REPL, test runner, LSP, and AI tools — all in one binary.

Compiler

Cranelift by default, LLVM for production, WebAssembly built-in. Three backends in one binary. 88.8% GHC test suite compatibility, 40+ extensions.

📦

Package Manager

Install Hackage packages with one command. Reads .cabal files, resolves dependencies, compiles multi-module projects. 16 packages compile today, cross-package resolution built in.

Script Runner

Run Haskell files directly with a shebang line. Write #!/usr/bin/env haskelujah at the top, chmod once, and use Haskelujah like a scripting runtime.

>

REPL

Interactive environment with :type, :info, :load, multi-line input, and expression evaluation. Explore APIs, test ideas, and debug interactively.

🤖

AI / MCP Server

Built-in MCP (Model Context Protocol) server. Run haskelujah mcp to expose type info, diagnostics, and project structure to Claude, GPT, and Gemini over stdio.

Editor / LSP

Built-in LSP server for real-time diagnostics in any editor. Run haskelujah lsp for VS Code, Neovim, Zed, Helix. Vision: a Haskell-extensible editor in the spirit of Emacs.

Runtime

Rust-based runtime with mark-sweep GC, thunk trampolines for lazy evaluation, C ABI interop, and heap tracking. No external runtime required.

Test Runner

Run haskelujah test to scan test directories, type-check all .hs files, and report results. Integrates with HUnit and QuickCheck conventions.

🔧

Tool Ecosystem

Interop via FFI, CPP, and Cabal. Pluggable backends (Cranelift, LLVM, Wasm, JVM, BEAM) for targeting any platform from a single codebase.

Performance

fib(42) benchmark -- compiled output runtime, Apple M-series

Cranelift (default) 0.91s
GHC 9.14 -O2 1.26s

Lower is better. Cranelift compiles 4x faster than LLVM with comparable runtime performance.

Full Benchmark Suite

BenchmarkProblemGHC 9.14 -O2CraneliftLLVMBest vs GHC
fib(42)Recursive Fibonacci1.26s0.91s0.91s1.38x faster
ack(3,11)Ackermann function0.26s0.62s1.03s0.42x
euler1(100M)100M iterations (TCO)0.09s0.15s0.35s0.60x
tak(30,20,10)Takeuchi function0.10s0.16s0.27s0.63x
qsort(1K)Quicksort random0.22s0.20s0.15sLLVM 1.47x
primes(10K)Sieve of Eratosthenes0.28s0.59s0.18sLLVM 1.56x

Benchmarks on Apple M-series. Both Cranelift and LLVM backends support tail-call optimization (TCO). Cranelift beats GHC -O2 on recursive workloads; LLVM excels at list-heavy operations.

See It In Action

3-minute demo: init, check, test, format, AI — all from one binary.

Try It Now

Write Haskell in your browser — no install needed.

Main.hs
Press "Typecheck" or Ctrl+Enter to check your code.

Get Started

Up and running in seconds.

terminal
# Install
$ cargo install haskelujah

# Create a project
$ mkdir my-app && cat > my-app/Main.hs
module Main where
main = putStrLn "Hello from Haskelujah"

# Build and run
$ haskelujah build my-app/
  Compiled 1 modules in order: Main
  Finished build in 0.09s
$ ./my-app/dist-chirho/build/my-app
  Hello from Haskelujah!

# Or skip compilation entirely — run as a script
$ cat > hello.hs
#!/usr/bin/env haskelujah
main = putStrLn "Runs directly, no build step."
$ chmod +x hello.hs && ./hello.hs
  Runs directly, no build step.
Main.hs
module Main where

-- Tail-call optimized loop plus ordinary recursion
euler1_chirho :: Int -> Int
euler1_chirho limit_chirho = go_chirho 0 0
  where
    go_chirho acc_chirho n_chirho
      | n_chirho >= limit_chirho = acc_chirho
      | n_chirho mod 3 == 0 || n_chirho mod 5 == 0
          = go_chirho (acc_chirho + n_chirho) (n_chirho + 1)
      | otherwise = go_chirho acc_chirho (n_chirho + 1)

main :: IO ()
main = print (euler1_chirho 1000)

Architecture

21 focused Rust crates. 12-phase compilation pipeline.

1. Lex
Tokenize Haskell source
2. Layout
Insert braces and semicolons
3. Parse
Lossless green-tree CST
4. Lower
Abstract syntax tree from CST
5. Resolve
Scope resolution, qualified names
6. Kind Infer
Kind inference with unification
7. Type Infer
HM Algorithm W, typeclasses, GADTs
8. Exhaustiveness
Pattern match checking
9. Desugar/Core
System FC Core IR, dict passing
10. Simplify
Inlining, CSE, specialization
11. Codegen
Cranelift / LLVM / WebAssembly
12. Link
Native executable or .wasm

Ecosystem

Built for compatibility with the Haskell ecosystem.

P

Cabal Support

Reads standard .cabal files. Multi-module projects with library and executable components compile out of the box.

H

Hackage + Batteries Included

haskelujah install aeson fetches from Hackage. 17 packages compile including transformers, mtl, parsec. Plus 9 built-in stdlib modules (JSON, Test, Args, HTTP, Text, Process, Time, File, Prelude) — no install needed.

1

Single Binary

One self-contained executable. No runtime dependencies, no GHC installation, no LLVM toolchain (unless you opt in). Install with cargo install haskelujah, then run binaries or scripts with #!/usr/bin/env haskelujah.

I

Interactive I/O

putStrLn, putStr, getLine, and read all work in compiled programs. Interactive prompts, scripting, and stdin-driven tools run end to end on both native backends.

R

REPL

haskelujah repl gives you an interactive environment with :type, :info, :load, multi-line input, and expression evaluation.

Current Limitations

Where we still fall short of GHC.

  • Rank-N types: Most rank-2 types work. Lens LensLike' and some deep higher-rank patterns still have inference gaps.
  • Quantified constraints: forall a. C a => D (f a) in class superclass positions needs parser-level AST support. Blocks deepseq.
  • Associated type families: Token s / Tokens s normalization not yet implemented. Blocks megaparsec stage 2.
  • Template Haskell: Basic splices and makeLenses work; full TH (typed splices, reify) is incomplete.
  • FFI: Basic libc interop (puts, printf, malloc). Full C header parsing and foreign exports are not yet implemented.

Roadmap

Where we're headed, God willing.

Wasm Playground

Compile the Haskelujah compiler to WebAssembly so the browser playground runs the real type checker — no server needed.

100+ Hackage Packages

17 packages compile today (transformers + mtl + parsec cascade). Next: aeson, lens, megaparsec, QuickCheck, deepseq.

Test Runner

haskelujah test to discover and run HUnit, QuickCheck, and Hspec test suites. Parallel execution, colored output, watch mode.

Full Self-Hosting

We already compile non-trivial Haskell to native binaries. Next: compile a Haskell-written frontend for Haskelujah itself — a compiler that compiles its own language.

Cross-Compilation

Target selection from CLI: compile to Linux, macOS, Windows, Wasm, or embedded targets from a single machine.

Strictness Analysis

Demand analysis to avoid unnecessary thunks. Worker-wrapper transform for strict arguments. Automatic unboxing.

Profiling

Cost-center annotation, heap profiling, time profiling, and flamegraph generation for performance optimization.

Formatter

haskelujah fmt for opinionated Haskell formatting. Fast, consistent, zero-config. Like rustfmt for Haskell.