macOS
brew install ghclocal Homebrew formula metadata
sudo port install ghcMacPorts ports tree · lang/ghc/Portfile · source: api.github.com
brew
Glorious Glasgow Haskell Compilation System. Version 9.14.1 via Homebrew; verified 2026-06-25.
install
brew install ghclocal Homebrew formula metadata
sudo port install ghcMacPorts ports tree · lang/ghc/Portfile · source: api.github.com
sudo apk add ghcAlpine Linux edge package indexes · ghc · source: dl-cdn.alpinelinux.org
sudo apt install ghcDebian stable package indexes · ghc · source: deb.debian.org
sudo dnf install ghcFedora Rawhide package metadata · ghc · source: dl.fedoraproject.org
nix profile install nixpkgs#ghcnixpkgs package indexes · ghc · source: raw.githubusercontent.com
sudo pacman -S ghcArch Linux sync databases · ghc · source: geo.mirror.pkgbuild.com
sudo zypper install ghcopenSUSE Tumbleweed package metadata · ghc · source: download.opensuse.org
choco install ghcChocolatey community package catalog · ghc · source: community.chocolatey.org
overview
Glorious Glasgow Haskell Compilation System
history
The Glasgow Haskell Compiler, usually called GHC, is the reference-grade open-source compiler and interactive environment for Haskell. It supplies the `ghc` compiler, the GHCi interpreter, package tools such as `ghc-pkg`, documentation tooling such as Haddock, and runtime-system support for profiling, parallelism, and native-code execution.
GHC began at the University of Glasgow near the beginning of the 1990s as an academic research project funded by the UK government. Its stated goals were practical as well as academic: make a robust and portable Haskell compiler freely available, provide a modular foundation for compiler research, and learn from real programs.
The compiler evolved into a self-hosted Haskell implementation with three major pieces: the compiler, boot libraries, and the runtime system. The runtime system became central to GHC's identity because it handles garbage collection, scheduling, profiling, exceptions, and the execution machinery linked into compiled Haskell programs.
GHC became the dominant implementation around which the Haskell ecosystem organized. The AOSA chapter by Simon Marlow and Simon Peyton Jones described hundreds of thousands of downloads, thousands of Hackage packages, undergraduate teaching use, and commercial use; the GHC site likewise points users to Hackage libraries, Haskell Language Server, Cabal, Stack, and GHCup.
The Homebrew `ghc` formula packages the general GHC track for macOS users, while separate versioned formulae let projects select older or branch-specific compiler lines. That split mirrors the way Haskell projects often pin compiler versions because language extensions, boot libraries, and package ABI compatibility can matter.
Practitioners use `ghc` for batch compilation, `ghci` for interactive development, `runghc` or `runhaskell` for scripts, `ghc-pkg` for package database inspection, and Haddock for API documentation. The user guide presents GHC as one program that can operate as either an interactive interpreter or a batch compiler.
Build tools such as Cabal and Stack commonly invoke GHC rather than requiring users to call every compiler flag by hand. Advanced users still care about GHC flags directly for optimisation, profiling, language extensions, cross-platform builds, and debugging package database or linker issues.
GHC is package-manager significant because it is both a compiler and a dependency root for much of the Haskell toolchain. Installing the formula affects not only `ghc`, but also GHCi, boot libraries, package metadata, Haddock, profiling tools, and the versioned executable names that allow scripts to target a specific compiler.
The project also embodies a classic language-runtime packaging problem: the compiler is written in Haskell and needs an existing GHC to build, while libraries compiled by one branch may need rebuilding for another. Versioned formulae, GHCup metadata, and project-level pinning all grew around those realities.
security posture
compiler and runtime ecosystem.
yellow risk · high confidence · runtime
Before unattended agent use, check whether the tool reads plaintext credentials, writes remote state, publishes artifacts, or shells out to plugins.
executables
| Command | Kind | Exposure | Note |
|---|---|---|---|
ghc | cli | global executable | |
ghc-9.14.1 | cli | global executable | |
ghc-pkg | cli | global executable | |
ghc-pkg-9.14.1 | cli | global executable | |
ghci | cli | global executable | |
ghci-9.14.1 | cli | global executable | |
haddock | cli | global executable | |
haddock-ghc-9.14.1 | cli | global executable | |
hp2ps | cli | global executable | |
hp2ps-ghc-9.14.1 | cli | global executable | |
hpc | cli | global executable | |
hpc-ghc-9.14.1 | cli | global executable | |
hsc2hs | cli | global executable | |
hsc2hs-ghc-9.14.1 | cli | global executable | |
runghc | cli | global executable | |
runghc-9.14.1 | cli | global executable | |
runhaskell | cli | global executable | |
runhaskell-9.14.1 | cli | global executable |
freshness
These signals separate page generation age, package-manager activity, and upstream release comparison. Version lag is warned only when an evidence URL and comparable versions are present.
install metadata
| Package key | brew:ghc |
|---|---|
| Version | 9.14.1 |
| Package manager | Homebrew |
| Package manager page | https://formulae.brew.sh/formula/ghc |
| Homepage | https://haskell.org/ghc/ |
| Repository | https://gitlab.haskell.org/ghc/ghc |
| Upstream docs | https://downloads.haskell.org/ghc/9.14.1/docs/users_guide |
| License | BSD-3-Clause |
| Source archive | https://downloads.haskell.org/~ghc/9.14.1/ghc-9.14.1-src.tar.xz |
| Last updated | 2026-06-25T13:37:42+02:00 |
| Pulse | updated |
| Dependencies | gmp |
| Build dependencies | autoconf, automake, python@3.14, sphinx-doc, xz |
| Uses from macOS | libffi, ncurses |
| Bottle | available (on arm64_linux, arm64_sequoia, arm64_sonoma, arm64_tahoe, sonoma, x86_64_linux) |
| Homebrew post-install | defined |
| Service | none declared |
registry facts
| Source Database | Homebrew formula API |
|---|---|
| Tap | homebrew/core |
| Full Name | ghc |
| Aliases |
|
| Version Scheme | 0 |
| Revision | 0 |
| Head Version | HEAD |
| Bottle Stable Root URL | https://ghcr.io/v2/homebrew/core |
| Deprecated | no |
| Disabled | no |
| Keg Only | no |
| URL Keys |
|
source database matches
Matches are pulled from external package-manager indexes and kept separate from local Automic Vault package links.
ghc 9.6.6-4
The Glasgow Haskell Compilation system
sudo apt install ghcghc-doc 9.6.6-4
Documentation for the Glasgow Haskell Compilation system
sudo apt install ghc-docghc-prof 9.6.6-4
Profiling libraries for the Glasgow Haskell Compilation system
sudo apt install ghc-profghc
nix profile install nixpkgs#ghcghc 9.4.7-3
The Glasgow Haskell Compilation system
sudo apt install ghcghc-doc 9.4.7-3
Documentation for the Glasgow Haskell Compilation system
sudo apt install ghc-docghc-prof 9.4.7-3
Profiling libraries for the Glasgow Haskell Compilation system
sudo apt install ghc-profghc 9.10.3-r2
The Glasgow Haskell Compiler
sudo apk add ghcghc-dev 9.10.3-r2
The Glasgow Haskell Compiler (development files)
sudo apk add ghc-devghc-doc 9.10.3-r2
The Glasgow Haskell Compiler (documentation)
sudo apk add ghc-docghc 9.10.3-155.fc45
Glasgow Haskell Compiler
sudo dnf install ghcghc-Cabal 3.12.1.0-155.fc45
Haskell Cabal library
https://hackage.haskell.org/package/Cabal
sudo dnf install ghc-Cabalghc-Cabal-devel 3.12.1.0-155.fc45
Haskell Cabal library development files
sudo dnf install ghc-Cabal-develghc-Cabal-doc 3.12.1.0-155.fc45
Haskell Cabal library documentation
sudo dnf install ghc-Cabal-docghc-Cabal-prof 3.12.1.0-155.fc45
Haskell Cabal profiling library
sudo dnf install ghc-Cabal-profghc-Cabal-syntax 3.12.1.0-155.fc45
Haskell Cabal-syntax library
https://hackage.haskell.org/package/Cabal-syntax
sudo dnf install ghc-Cabal-syntaxsource trail
This page is generated by av-web from the private package SQLite artifact built by scripts/generate-pkg-sqlite.py.
View the package source record on GitHub.