macOS
brew install ghclocal Homebrew formula metadata
sudo port install ghcMacPorts ports tree · lang/ghc/Portfile · ソース: api.github.com
brew
ghc のインストール経路、実行ファイル、メタデータ、AI エージェント向けセキュリティノートを確認します。
インストール
brew install ghclocal Homebrew formula metadata
sudo port install ghcMacPorts ports tree · lang/ghc/Portfile · ソース: api.github.com
sudo apk add ghcAlpine Linux edge package indexes · ghc · ソース: dl-cdn.alpinelinux.org
sudo dnf install ghcFedora Rawhide package metadata · ghc · ソース: dl.fedoraproject.org
nix profile install nixpkgs#ghcnixpkgs package indexes · ghc · ソース: raw.githubusercontent.com
sudo pacman -S ghcArch Linux sync databases · ghc · ソース: geo.mirror.pkgbuild.com
sudo zypper install ghcopenSUSE Tumbleweed package metadata · ghc · ソース: download.opensuse.org
choco install ghcChocolatey community package catalog · ghc · ソース: community.chocolatey.org
概要
Glorious Glasgow Haskell Compilation System
履歴
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.
セキュリティ状態
compiler and runtime ecosystem.
リスク yellow · 信頼度 高 · runtime
エージェントに無人実行させる前に、このツールが平文の認証情報を読むか、リモート状態を書き込むか、成果物を公開するか、プラグインを起動するかを確認してください。
実行可能ファイル
| コマンド | 種類 | 公開範囲 | メモ |
|---|---|---|---|
ghc | cli | グローバル実行可能ファイル | |
ghc-9.14.1 | cli | グローバル実行可能ファイル | |
ghc-pkg | cli | グローバル実行可能ファイル | |
ghc-pkg-9.14.1 | cli | グローバル実行可能ファイル | |
ghci | cli | グローバル実行可能ファイル | |
ghci-9.14.1 | cli | グローバル実行可能ファイル | |
haddock | cli | グローバル実行可能ファイル | |
haddock-ghc-9.14.1 | cli | グローバル実行可能ファイル | |
hp2ps | cli | グローバル実行可能ファイル | |
hp2ps-ghc-9.14.1 | cli | グローバル実行可能ファイル | |
hpc | cli | グローバル実行可能ファイル | |
hpc-ghc-9.14.1 | cli | グローバル実行可能ファイル | |
hsc2hs | cli | グローバル実行可能ファイル | |
hsc2hs-ghc-9.14.1 | cli | グローバル実行可能ファイル | |
runghc | cli | グローバル実行可能ファイル | |
runghc-9.14.1 | cli | グローバル実行可能ファイル | |
runhaskell | cli | グローバル実行可能ファイル | |
runhaskell-9.14.1 | cli | グローバル実行可能ファイル |
鮮度
これらの信号は、ページ生成時期、パッケージマネージャの活動、上流リリース比較を分けて示します。バージョン遅れは、証拠 URL と比較可能なバージョンがある場合だけ警告されます。
インストールメタデータ
| パッケージキー | brew:ghc |
|---|---|
| バージョン | 9.14.1 |
| パッケージマネージャ | Homebrew |
| パッケージマネージャページ | https://formulae.brew.sh/formula/ghc |
| ホームページ | https://haskell.org/ghc/ |
| リポジトリ | https://gitlab.haskell.org/ghc/ghc |
| 上流ドキュメント | https://downloads.haskell.org/ghc/9.14.1/docs/users_guide |
| ライセンス | BSD-3-Clause |
| ソースアーカイブ | https://downloads.haskell.org/~ghc/9.14.1/ghc-9.14.1-src.tar.xz |
| 最終更新 | 2026-06-25T13:37:42+02:00 |
| Pulse | updated |
| 依存関係 | gmp |
| ビルド依存関係 | autoconf, automake, python@3.14, sphinx-doc, xz |
| macOS 提供ライブラリ | libffi, ncurses |
| Bottle | 利用可能 (対象 arm64_linux, arm64_sequoia, arm64_sonoma, arm64_tahoe, sonoma, x86_64_linux) |
| Homebrew post-install | 定義済み |
| サービス | 宣言なし |
レジストリ情報
| 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 |
|
ソースデータベース一致
一致は外部パッケージマネージャインデックスから取得され、ローカルの Automic Vault パッケージリンクとは分けて表示されます。
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-syntaxソース経路
このページは scripts/generate-pkg-sqlite.py が生成した非公開のパッケージ SQLite アーティファクトから av-web によって提供されます。
View the package source record on GitHub.