Legacy Implementation: jazz2
Relevant source files
The following files were used as context for generating this wiki page:
Introduction
jazz2 represents a legacy and experimental reference implementation within the Jazz project. Its primary purpose is to serve as a design source for future ideas rather than acting as a normative or authoritative source for the current language behavior. In the project's governance hierarchy, it is explicitly designated as non-normative and reference-only.
Development and implementation work has shifted away from this directory in favor of jazz-next/, which is the active compiler implementation path. Consequently, jazz2 is treated as a read-only workspace under the project's architectural policies.
Sources: README.md:27-28, AGENTS.md:5-7, scripts/check-spec-authority.sh:33-35
Governance and Policy
The project maintains strict guardrails regarding the role of jazz2. It is categorized as "experimental/reference code" and is subject to a read-only policy to prevent accidental divergence from the canonical language specification.
Authority Status
The following table outlines the status of jazz2 relative to other project components:
| Component | Role | Authority Level |
|---|---|---|
docs/spec/* | Canonical Specification | Normative |
jazz-next/ | Active Compiler | Normative (Implemented Subset) |
jazz-hs/ | Historical Reference | Non-Normative |
jazz2/ | Design Reference / Experimental | Non-Normative |
Sources: README.md:27-31, AGENTS.md:5-15, scripts/check-spec-authority.sh:33-40
Technical Architecture and Dependencies
The jazz2 implementation is built using the Haskell toolchain, managed via Stack. The architecture is divided into a library core, a primary executable (jazz-exe), and a test suite (jazz-test).
Dependency Profile
The project relies on several key Haskell libraries for parsing, diagnostics, and testing:
- Parsing:
megaparsecandparser-combinators. - Diagnostics:
diagnosefor error reporting. - Formatting:
prettyprinterandprettyprinter-ansi-terminal. - Logic/Data:
containers,lens,mtl, andbifunctors. - Testing:
tasty,hspec, andtasty-hunit.
Sources: jazz2/package.yaml:20-46, jazz2/stack.yaml:31-33
Build and Project Structure
The following diagram illustrates the structural organization of the jazz2 legacy component:
The diagram shows the internal dependency flow where both the main executable and the test suite depend on the core library located in src/.
Sources: jazz2/package.yaml:58-86
Development Lifecycle
jazz2 reached version 0.1.0.0 but remains in an "Unreleased" state in its internal changelog. While it includes the necessary configuration for GHC options and package metadata, further development is restricted to legacy maintenance only if explicitly requested.
Compiler Configuration
The implementation uses strict GHC warnings to ensure code quality:
-Wall: Enable all common warnings.-Wincomplete-record-updates: Warn on incomplete record updates.-Wmissing-export-lists: Ensure all modules have explicit export lists.
Sources: jazz2/CHANGELOG.md:10-12, jazz2/package.yaml:48-56, AGENTS.md:9-11
Summary
The jazz2 module serves as a historical and experimental milestone for the Jazz language. While it provides a foundation in terms of Haskell-based parsing and diagnostic infrastructure, it has been superseded by jazz-next/. It remains in the repository primarily for its value as a "design source" and as a reference for architectural patterns that may be integrated into the canonical implementation.