Project Story & Motivation
Relevant source files
The following files were used as context for generating this wiki page:
Jazz is a functional programming language designed to bridge the gap between the expressive power of languages like Haskell and the accessibility of languages like Elixir. The project focuses on providing a strong, statically typed environment with type inference, while deliberately avoiding the complex category theory terminology (e.g., Monads, Semigroupoids) that often presents a barrier to entry for beginners. Instead, Jazz adopts a standard approach to typeclasses using intuitive categories such as Collection and Orderable.
Sources: README.md:1-10, jazz2/package.yaml:1-20
Vision and Core Philosophy
The primary motivation behind Jazz is to create a functional language that is "easy to understand" in terms of syntax and type systems. It emphasizes immutability, currying by default, and a clear distinction between pure and impure functions.
Key Conceptual Pillars
- Accessible Type System: Replacing abstract category theory concepts with human-readable typeclasses.
- Safety by Default: Strong static typing and explicit markers (
!) for impure functions. - Modern Functional Features: First-class functions, partial application, and robust type inference.
Sources: README.md:5-25, README.md:95-105
Language Evolution and Workspace Architecture
The Jazz project has undergone significant structural transitions to manage its evolution from experimental sketches to a verified compiler implementation. The repository is partitioned into distinct workspaces, each representing a different stage of the project's lifecycle.
The following diagram illustrates the relationship between the different compiler iterations and their authoritative status within the project.
Note: The authority hierarchy mandates that jazz-next and docs/spec/ serve as the source of truth, while jazz-hs and jazz2 are kept for historical context.
Sources: README.md:38-48, jazz-next/README.md:1-10, AGENTS.md:1-10, scripts/check-spec-authority.sh:30-45
Workspace Definition
| Workspace | Status | Role |
|---|---|---|
jazz-next/ | Active | The primary target for new compiler implementation work including the analyzer, parser, and type inference. |
jazz-hs/ | Legacy | Read-only historical reference code. Originally used as an implementation baseline. |
jazz2/ | Legacy | Reference-only design source for future ideas; non-normative for current behavior. |
Sources: jazz-next/README.md:3-10, AGENTS.md:3-15, scripts/check-spec-authority.sh:30-40
Feature Implementation Status
The project tracks its progress through a "verified" subset of features currently operational in the jazz-next path versus aspirational goals.
Implemented Today (Verified)
- Core Expression Subset: Strong, static typing and type inference are fully operational for core expressions.
- Function Semantics: Functions are first-class citizens and are curried by default.
- Purity Enforcement: Stub enforcement prevents direct calls to impure functions (denoted by
!) within pure binding bodies. - Runtime Helpers: A bundled prelude provides standard functions like
map,filter,hd,tl, andprint!.
Sources: README.md:12-25, jazz-next/README.md:15-25
Planned and Aspirational Features
The roadmap includes advanced language features and performance targets:
- Algebraic Data Types (ADTs): End-to-end runtime and compiler behavior for ADTs.
- Pattern Matching: Full implementation across the compiler and runtime.
- LLVM Backend: Targeting LLVM for high-performance execution (evidenced by the inclusion of
llvm-hsdependencies in legacy and local-dependency paths). - Module System: Full semantics for module loading and imports.
Sources: README.md:27-35, jazz-hs/package.yaml:20-35
Repository Governance
The project maintains strict governance via automated scripts to ensure that documentation and implementation remain synchronized. Semantic changes to the language require a Formal Decision Record or RFC before implementation.
Note: This workflow ensures that jazz2 remains reference-only and that any behavior changes are anchored to the canonical specification.
Sources: README.md:43-48, scripts/check-spec-authority.sh:10-30, scripts/check-docs.sh:10-25
Conclusion
The Jazz project is motivated by a desire to provide a functional language that prioritizes developer experience and clarity without sacrificing the safety of static typing. By organizing the repository into a clear hierarchy—moving from legacy prototypes (jazz-hs, jazz2) to a modern, verified compiler (jazz-next)—the project maintains a clear path toward its aspirational goals of a high-performance, LLVM-backed functional environment.
Sources: README.md:1-50, jazz-next/README.md:1-15