Haskeluya Chirho

Haskell Compiler • Rust Implementation

Compile the shape of Haskell into something fast, explicit, and portable.

Haskeluya Chirho is an under-active-development compiler pipeline with real parsing, naming, kind inference, type inference, Core lowering, STG-style evaluation, LLVM IR emission, and WebAssembly output.

  • Rust
  • Haskell 2010+
  • STG Runtime
  • LLVM IR
  • WebAssembly

Workspace Crates

19

Rust LOC

103,066

Static Tests

1,565

Current State

Broad pipeline, green workspace, hardening phase.

Milestone

M1 In Progress

The foundations are not theoretical anymore. The repo is already executing real end-to-end compiler work, and the remaining push is quality, semantics, and integration depth.

Verified

Workspace Tests Pass

The project currently holds together across the workspace, which matters more than any single flashy subsystem.

What Already Works

Compiler + Runtime

Parsing, lowering, typing, Core transforms, runtime evaluation, LLVM IR, and Wasm are all present in the codebase today.

Main Pressure

Hardening And Decomposition

The next wins are parser robustness, warning propagation, cache reuse, and shrinking the giant files that now carry too much responsibility.

Pipeline

One compiler story, phase by phase.

  1. 01

    Lex + Layout

    Lossless tokens, trivia, and virtual layout tokens for Haskell-style indentation.

  2. 02

    CST Parse + AST Lower

    Recursive-descent parsing into a green tree, then lowering into compiler-friendly AST structures.

  3. 03

    Naming + Module Interfaces

    Resolution across modules, imports, exports, qualified names, and interface-aware downstream compilation.

  4. 04

    Kind + Type Inference

    HM-style type inference with class machinery, deriving support, and exhaustiveness diagnostics layered into the pipeline.

  5. 05

    Core + Runtime Paths

    Core lowering, dictionary passing, simplification, STG-style runtime evaluation, and backend lowering into LLVM IR and Wasm.

Workspace

Nineteen crates, each pulling on a different part of the compiler.

Foundations

Span, Diagnostics, Syntax

  • `haskeluya-span-chirho`
  • `haskeluya-diagnostics-chirho`
  • `haskeluya-syntax-chirho`
  • `haskeluya-test-harness-chirho`

Frontend

Parse, Lower, Resolve, Infer

  • `haskeluya-parser-chirho`
  • `haskeluya-ast-chirho`
  • `haskeluya-naming-chirho`
  • `haskeluya-typing-chirho`

Middle + Driver

Core, Runtime, Orchestration

  • `haskeluya-core-chirho`
  • `haskeluya-runtime-chirho`
  • `haskeluya-driver-chirho`
  • `haskeluya-incremental-chirho`

Distribution

Packages, CLI, Targets

  • `haskeluya-package-chirho`
  • `haskeluya-cli-chirho`
  • `haskeluya-backend-llvm-chirho`
  • `haskeluya-backend-wasm-chirho`
  • `haskeluya-backend-cranelift-chirho`
  • `haskeluya-backend-jvm-chirho`
  • `haskeluya-backend-beam-chirho`

Why It Matters

Not a toy parser. A compiler architecture with room to grow.

The project is already past the stage where success means proving the idea. Success now means making the existing architecture harder to break, easier to evolve, and honest about what is stable versus experimental.

What Is Strong

Phase boundaries are clearer, the driver has a shared frontend, the runtime is real, and the workspace has a large passing test corpus.

What Still Bites

Parser malformed-input panics, warning results dropped by compile APIs, unfinished incremental-result reuse, and giant files that carry too much complexity.

Where It Can Go

More real-world package coverage, stronger runtime contracts, faster incremental builds, and clearer backend maturity tiers.

Roadmap

Ship the hardening work without losing the architecture.

Now

Finish M1 With Discipline

Remove parser panic paths, surface warnings everywhere they matter, and close the artifact-cache loop.

Next

Broaden Compatibility

Expand module and package realism, keep pushing on typeclass and runtime semantics, and harden the compiler against uglier inputs.

Later

Grow Targets Without Lying

Keep LLVM, Wasm, Cranelift, JVM, and BEAM separated by actual maturity, not by wishful symmetry in the UI.