macOS
brew install ghclocal Homebrew formula metadata
sudo port install ghcMacPorts ports tree · lang/ghc/Portfile · Source: api.github.com
brew
Consultez les chemins d'installation, exécutables, métadonnées et notes de sécurité de ghc pour les workflows d'agents IA.
installation
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
aperçu
Glorious Glasgow Haskell Compilation System
historique
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.
posture de sécurité
compiler and runtime ecosystem.
risque yellow · confiance élevé · runtime
Avant une utilisation sans surveillance par un agent, vérifiez si l'outil lit des identifiants en clair, écrit un état distant, publie des artefacts ou lance des plugins.
exécutables
| Commande | Type | Exposition | Note |
|---|---|---|---|
ghc | cli | exécutable global | |
ghc-9.14.1 | cli | exécutable global | |
ghc-pkg | cli | exécutable global | |
ghc-pkg-9.14.1 | cli | exécutable global | |
ghci | cli | exécutable global | |
ghci-9.14.1 | cli | exécutable global | |
haddock | cli | exécutable global | |
haddock-ghc-9.14.1 | cli | exécutable global | |
hp2ps | cli | exécutable global | |
hp2ps-ghc-9.14.1 | cli | exécutable global | |
hpc | cli | exécutable global | |
hpc-ghc-9.14.1 | cli | exécutable global | |
hsc2hs | cli | exécutable global | |
hsc2hs-ghc-9.14.1 | cli | exécutable global | |
runghc | cli | exécutable global | |
runghc-9.14.1 | cli | exécutable global | |
runhaskell | cli | exécutable global | |
runhaskell-9.14.1 | cli | exécutable global |
fraîcheur
Ces signaux séparent l'âge de génération de la page, l'activité du gestionnaire de paquets et la comparaison avec les versions amont. Un retard de version n'est signalé que lorsqu'une URL de preuve et des versions comparables sont présentes.
métadonnées d'installation
| Clé du paquet | brew:ghc |
|---|---|
| Version | 9.14.1 |
| Gestionnaire de paquets | Homebrew |
| Page du gestionnaire de paquets | https://formulae.brew.sh/formula/ghc |
| Page d'accueil | https://haskell.org/ghc/ |
| Dépôt | https://gitlab.haskell.org/ghc/ghc |
| Docs amont | https://downloads.haskell.org/ghc/9.14.1/docs/users_guide |
| Licence | BSD-3-Clause |
| Archive source | https://downloads.haskell.org/~ghc/9.14.1/ghc-9.14.1-src.tar.xz |
| Dernière mise à jour | 2026-06-25T13:37:42+02:00 |
| Pulse | updated |
| Dépendances | gmp |
| Dépendances de compilation | autoconf, automake, python@3.14, sphinx-doc, xz |
| Bibliothèques fournies par macOS | libffi, ncurses |
| Bouteille | disponible (sur arm64_linux, arm64_sequoia, arm64_sonoma, arm64_tahoe, sonoma, x86_64_linux) |
| post-install Homebrew | défini |
| Service | aucun déclaré |
faits du registre
| 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 |
|
correspondances dans les bases sources
Les correspondances proviennent d’index externes de gestionnaires de paquets et restent séparées des liens de paquets Automic Vault locaux.
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-syntaxpiste source
Cette page est servie par av-web depuis l'artéfact SQLite privé des paquets généré par scripts/generate-pkg-sqlite.py.
View the package source record on GitHub.