Skip to content

GHC Compiler Python v9.4.9

Choose a tag to compare

@github-actions github-actions released this 28 Jul 09:11
76dc485

⚡ GHC Compiler Python · v9.4.9

GHC 9.4.8 · Cabal 3.10.3.0 · Windows · macOS · Linux

The first pip-installable Glasgow Haskell Compiler

Ko-fi
PyPI
Nova-Violet Role


⚠️ 9.4.8 does not work on Windows. Upgrade.

The 9.4.8 wheel aborted with FATAL ERROR: The GHC compiler requires a host C-linker (gcc or clang) on any Windows machine without a system compiler — which is nearly all of them. The Windows payload ships its own toolchain (mingw/bin/clang.exe, and it is why that payload is 396 MB), but the wrapper checked only the system PATH and gave up before it ever looked inside. It also ran the check before downloading the payload, so there was nothing to find either way.

CI never caught it because windows-latest installs mingw via chocolatey, so a system gcc is always present there. It was found on the first genuine end-user install.

pip install --upgrade ghc-compiler-python

The version number moved, the compiler did not. This release packages the same GHC 9.4.8; ghc-wrapper --numeric-version still reports 9.4.8. The distribution version and the compiler version are now separate axes, because PyPI does not allow replacing a published version and a single constant made "publish a fixed wheel" and "claim a GHC release that does not exist" the same edit.


🚀 Just install it

pip install ghc-compiler-python

~17 KiB. The toolchain for your platform is fetched on first use and verified against a SHA-256 digest baked into the wheel. You do not need anything on this page.


📦 Which asset do I want?

Only if you need an offline or air-gapped install:

You are on Download Size
🐧 Linux (glibc ≥ 2.38) ghc_compiler_python-9.4.9-py3-none-manylinux_2_38_x86_64.manylinux_2_39_x86_64.whl ~188 MB
🍎 macOS (Apple Silicon) ghc_compiler_python-9.4.9-py3-none-macosx_11_0_arm64.whl ~191 MB
🪟 Windows (x86_64) ghc_compiler_python-9.4.9-py3-none-win_amd64.whl ~403 MB
pip install ./ghc_compiler_python-9.4.9-py3-none-<your-platform>.whl

These bundle the whole toolchain and never contact the network.

On a Linux with glibc older than 2.38, use pip install ghc-compiler-python instead. auditwheel derives that floor from the versioned symbols the binaries actually reference, and the wheel states it honestly rather than installing and failing later.

🔍 Toolchain payloads (advanced)

The ghc-payload-* archives are what the thin wheel downloads on first use. You rarely want these directly — but you can pre-seed a cache with one:

export GHC_COMPILER_PYTHON_HOME=/path/to/cache
# extract the payload there, then run offline
export GHC_COMPILER_PYTHON_OFFLINE=1

Each is published with a .sha256 companion. The digests are embedded in the thin wheel at build time, so verification is automatic.


✅ How this release was verified

Every asset here was produced by the same workflow run that proved, on each operating system separately:

  1. the wheel installs
  2. ghc-wrapper --numeric-version reports 9.4.8 — our pinned compiler, not one that happened to be on the runner
  3. a Haskell program compiles
  4. the compiled binary runs
  5. its output matches exactly

Builds ≠ installs ≠ compiles ≠ delivered. All five links are asserted before anything is published.

New in 9.4.9: the Windows leg now removes every system gcc/clang from PATH before it compiles, and fails loudly if one survives. That single difference between the runner and a real machine is what let 9.4.8 ship green and broken. A runner better equipped than the machine it certifies is not a test, it is a rehearsal.

The Lean 4 proofs build with zero sorry in the same pipeline. The linker fix is covered by lean/Proofs/Linker.lean, whose model is diffed against the real wrapper.py by a cross-check that materialises toolchain roots on disk and runs the shipped code over them.


⚙️ Configuration

Variable Effect
GHC_COMPILER_PYTHON_HOME Where the toolchain is cached
GHC_COMPILER_PYTHON_OFFLINE 1 refuses network access entirely

💻 Usage

ghc-wrapper Main.hs      # compile
ghci-wrapper             # REPL
cabal-wrapper build      # build a project

Resolution is hermetic — a GHC already on your PATH is deliberately ignored, so you always get the pinned 9.4.8.


⚡ One command. Three platforms. The full Haskell toolchain.

If this saved you time, you can support the work:

Support Our Journey

README · Architecture · Issues

© 2026 Nova-Violet Role · Non-Profit Organization

Created with ❤️ for the advancement of human understanding