Automic VaultAutomic Vault

brew

使用 Homebrew, apk, chocolatey, apt, dnf, MacPorts, Nix, pacman, zypper 安装 ghc

查看 ghc 的安装路径、可执行文件、元数据以及面向 AI 代理工作流的安全说明。

安装

其他安装命令

macOS

Homebrew已验证 · 100%
brew install ghc

local Homebrew formula metadata

MacPorts已验证 · 94%
sudo port install ghc

MacPorts ports tree · lang/ghc/Portfile · 来源: api.github.com

Linux

Alpine Linux apk已验证 · 92%
sudo apk add ghc

Alpine Linux edge package indexes · ghc · 来源: dl-cdn.alpinelinux.org

Debian apt已验证 · 92%
sudo apt install ghc

Debian stable package indexes · ghc · 来源: deb.debian.org

Fedora dnf已验证 · 92%
sudo dnf install ghc

Fedora Rawhide package metadata · ghc · 来源: dl.fedoraproject.org

Nix已验证 · 92%
nix profile install nixpkgs#ghc

nixpkgs package indexes · ghc · 来源: raw.githubusercontent.com

Arch Linux pacman已验证 · 92%
sudo pacman -S ghc

Arch Linux sync databases · ghc · 来源: geo.mirror.pkgbuild.com

openSUSE zypper已验证 · 92%
sudo zypper install ghc

openSUSE Tumbleweed package metadata · ghc · 来源: download.opensuse.org

概览

软件包摘要

Glorious Glasgow Haskell Compilation System

命令和别名

  • ghc
  • ghc-9.14.1
  • ghc-pkg
  • ghc-pkg-9.14.1
  • ghci
  • ghci-9.14.1
  • haddock
  • haddock-ghc-9.14.1
  • hp2ps
  • hp2ps-ghc-9.14.1
  • hpc
  • hpc-ghc-9.14.1
  • hsc2hs
  • hsc2hs-ghc-9.14.1
  • runghc
  • runghc-9.14.1
  • runhaskell
  • runhaskell-9.14.1

历史

项目历史与用法

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.

时间线

  • 1990: Haskell was created as a common lazy functional language for research.
  • Early 1990s: GHC began as a Glasgow research project with portability, performance, and extensibility goals.
  • 2007: The GHC user guide documented the even-numbered stable-branch versioning policy starting with GHC 6.8.
  • 2011: The AOSA chapter described GHC as an industrial-strength compiler used in teaching, research, and commercial settings.
  • 2025: GHC 9.14.1 release artifacts provided the branch represented by the unversioned Homebrew executable names in this batch input.

Related projects

  • Hackage is the package repository that distributes Haskell libraries built for use with GHC and other tooling.
  • GHCup is the Haskell installer that installs GHC along with related tools.
  • Cabal, Stack, Haddock, Happy, Alex, and Haskell Language Server form the surrounding toolchain named by GHC's own documentation.

安全态势

风险级别:yellow

compiler and runtime ecosystem.

风险分类器

yellow 风险 · 高 置信度 · runtime

原因

  • compiler and runtime ecosystem

信号

  • override:ghc

安装行为

  • Homebrew 为此 formula 声明了 post-install 钩子。
  • Homebrew bottle 元数据适用于 6 个平台目标。
  • 安装时包含 1 个运行时依赖。
  • 构建元数据列出 5 个构建依赖。

建议审查

在无人值守的代理使用前,请检查该工具是否读取明文凭据、写入远程状态、发布制品或调用插件。

可执行文件

已安装的可执行文件

命令类型暴露范围备注
ghccli全局可执行文件
ghc-9.14.1cli全局可执行文件
ghc-pkgcli全局可执行文件
ghc-pkg-9.14.1cli全局可执行文件
ghcicli全局可执行文件
ghci-9.14.1cli全局可执行文件
haddockcli全局可执行文件
haddock-ghc-9.14.1cli全局可执行文件
hp2pscli全局可执行文件
hp2ps-ghc-9.14.1cli全局可执行文件
hpccli全局可执行文件
hpc-ghc-9.14.1cli全局可执行文件
hsc2hscli全局可执行文件
hsc2hs-ghc-9.14.1cli全局可执行文件
runghccli全局可执行文件
runghc-9.14.1cli全局可执行文件
runhaskellcli全局可执行文件
runhaskell-9.14.1cli全局可执行文件

新鲜度

版本和新鲜度

这些信号区分页生成时间、软件包管理器活动和上游发布比较。只有存在证据 URL 和可比较版本时,才会提示版本落后。

页面生成时间2026-07-10
管理器版本9.14.1
管理器更新时间2026-06-25
本地数据OK
上游not checked
检测到的最新版本未检测到

https://haskell.org/ghc/

安装元数据

软件包元数据

软件包键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
Pulseupdated
依赖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 DatabaseHomebrew formula API
Taphomebrew/core
Full Nameghc
Aliases
  • ghc@9
  • ghc@9.14
Version Scheme0
Revision0
Head VersionHEAD
Bottle Stable Root URLhttps://ghcr.io/v2/homebrew/core
Deprecatedno
Disabledno
Keg Onlyno
URL Keys
  • head
  • stable

源数据库匹配

其他软件包管理器记录

匹配项来自外部软件包管理器索引,并与本地 Automic Vault 软件包链接分开显示。

Debian apt95%

ghc 9.6.6-4

The Glasgow Haskell Compilation system

https://haskell.org/ghc/

sudo apt install ghc
  • Section: haskell
  • Architecture: amd64
  • 12 依赖
  • 32 提供
  • 5 可选依赖
  • normalized package name match
  • 匹配方式:Ghc
Debian stable package indexes · deb.debian.org · Debian stable package indexes: ghc from https://deb.debian.org/debian/dists/stable/main/binary-amd64/Packages.xz
Debian apt95%

ghc-doc 9.6.6-4

Documentation for the Glasgow Haskell Compilation system

https://haskell.org/ghc/

sudo apt install ghc-doc
  • Section: doc
  • Architecture: all
  • Source Package: ghc
  • 3 依赖
  • 32 提供
  • normalized package name match
  • 匹配方式:Ghc
Debian stable package indexes · deb.debian.org · Debian stable package indexes: ghc-doc from https://deb.debian.org/debian/dists/stable/main/binary-amd64/Packages.xz
Debian apt95%

ghc-prof 9.6.6-4

Profiling libraries for the Glasgow Haskell Compilation system

https://haskell.org/ghc/

sudo apt install ghc-prof
  • Section: haskell
  • Architecture: amd64
  • Source Package: ghc
  • 1 依赖
  • 32 提供
  • normalized package name match
  • 匹配方式:Ghc
Debian stable package indexes · deb.debian.org · Debian stable package indexes: ghc-prof from https://deb.debian.org/debian/dists/stable/main/binary-amd64/Packages.xz
Nix95%

ghc

nix profile install nixpkgs#ghc
  • normalized package name match
  • 匹配方式:Ghc
nixpkgs package indexes · raw.githubusercontent.com · nixpkgs package indexes: ghc from https://raw.githubusercontent.com/NixOS/nixpkgs/master/pkgs/top-level/all-packages.nix
Ubuntu apt95%

ghc 9.4.7-3

The Glasgow Haskell Compilation system

https://haskell.org/ghc/

sudo apt install ghc
  • Section: universe/haskell
  • Architecture: amd64
  • 10 依赖
  • 32 提供
  • 4 可选依赖
  • normalized package name match
  • 匹配方式:Ghc
Ubuntu 24.04 LTS package indexes · archive.ubuntu.com · Ubuntu 24.04 LTS package indexes: ghc from https://archive.ubuntu.com/ubuntu/dists/noble/universe/binary-amd64/Packages.gz
Ubuntu apt95%

ghc-doc 9.4.7-3

Documentation for the Glasgow Haskell Compilation system

https://haskell.org/ghc/

sudo apt install ghc-doc
  • Section: universe/doc
  • Architecture: all
  • Source Package: ghc
  • 3 依赖
  • 32 提供
  • normalized package name match
  • 匹配方式:Ghc
Ubuntu 24.04 LTS package indexes · archive.ubuntu.com · Ubuntu 24.04 LTS package indexes: ghc-doc from https://archive.ubuntu.com/ubuntu/dists/noble/universe/binary-amd64/Packages.gz
Ubuntu apt95%

ghc-prof 9.4.7-3

Profiling libraries for the Glasgow Haskell Compilation system

https://haskell.org/ghc/

sudo apt install ghc-prof
  • Section: universe/haskell
  • Architecture: amd64
  • Source Package: ghc
  • 1 依赖
  • 32 提供
  • normalized package name match
  • 匹配方式:Ghc
Ubuntu 24.04 LTS package indexes · archive.ubuntu.com · Ubuntu 24.04 LTS package indexes: ghc-prof from https://archive.ubuntu.com/ubuntu/dists/noble/universe/binary-amd64/Packages.gz
apk95%

ghc 9.10.3-r2

The Glasgow Haskell Compiler

https://haskell.org/ghc

sudo apk add ghc
  • License: BSD-3-Clause
  • Architecture: x86_64
  • Source Package: ghc
  • 1 依赖
  • 1 提供
  • normalized package name match
  • 匹配方式:Ghc
Alpine Linux edge package indexes · dl-cdn.alpinelinux.org · Alpine Linux edge package indexes: ghc from https://dl-cdn.alpinelinux.org/alpine/edge/community/x86_64/APKINDEX.tar.gz
apk95%

ghc-dev 9.10.3-r2

The Glasgow Haskell Compiler (development files)

https://haskell.org/ghc

sudo apk add ghc-dev
  • License: BSD-3-Clause
  • Architecture: x86_64
  • Source Package: ghc
  • 1 依赖
  • normalized package name match
  • 匹配方式:Ghc
Alpine Linux edge package indexes · dl-cdn.alpinelinux.org · Alpine Linux edge package indexes: ghc-dev from https://dl-cdn.alpinelinux.org/alpine/edge/community/x86_64/APKINDEX.tar.gz
apk95%

ghc-doc 9.10.3-r2

The Glasgow Haskell Compiler (documentation)

https://haskell.org/ghc

sudo apk add ghc-doc
  • License: BSD-3-Clause
  • Architecture: x86_64
  • Source Package: ghc
  • normalized package name match
  • 匹配方式:Ghc
Alpine Linux edge package indexes · dl-cdn.alpinelinux.org · Alpine Linux edge package indexes: ghc-doc from https://dl-cdn.alpinelinux.org/alpine/edge/community/x86_64/APKINDEX.tar.gz
dnf95%

ghc 9.10.3-155.fc45

Glasgow Haskell Compiler

https://haskell.org/ghc/

sudo dnf install ghc
  • License: BSD-3-Clause AND HaskellReport
  • Category: Unspecified
  • Architecture: x86_64
  • Source Package: ghc
  • 8 依赖
  • 2 提供
  • normalized package name match
  • 匹配方式:Ghc
Fedora Rawhide package metadata · dl.fedoraproject.org · Fedora Rawhide package metadata: ghc from https://dl.fedoraproject.org/pub/fedora/linux/development/rawhide/Everything/x86_64/os/repodata/e5ca8ce900cd68f5419e1c39ae517343100b306336cbaeb70a3c153121d95094-primary.xml.zst
dnf95%

ghc-Cabal 3.12.1.0-155.fc45

Haskell Cabal library

https://hackage.haskell.org/package/Cabal

sudo dnf install ghc-Cabal
  • License: BSD-3-Clause
  • Category: Unspecified
  • Architecture: x86_64
  • Source Package: ghc
  • 29 依赖
  • 2 提供
  • normalized package name match
  • 匹配方式:Ghc
Fedora Rawhide package metadata · dl.fedoraproject.org · Fedora Rawhide package metadata: ghc-Cabal from https://dl.fedoraproject.org/pub/fedora/linux/development/rawhide/Everything/x86_64/os/repodata/e5ca8ce900cd68f5419e1c39ae517343100b306336cbaeb70a3c153121d95094-primary.xml.zst
dnf95%

ghc-Cabal-devel 3.12.1.0-155.fc45

Haskell Cabal library development files

https://haskell.org/ghc/

sudo dnf install ghc-Cabal-devel
  • License: BSD-3-Clause
  • Category: Unspecified
  • Architecture: x86_64
  • Source Package: ghc
  • 3 依赖
  • 3 提供
  • normalized package name match
  • 匹配方式:Ghc
Fedora Rawhide package metadata · dl.fedoraproject.org · Fedora Rawhide package metadata: ghc-Cabal-devel from https://dl.fedoraproject.org/pub/fedora/linux/development/rawhide/Everything/x86_64/os/repodata/e5ca8ce900cd68f5419e1c39ae517343100b306336cbaeb70a3c153121d95094-primary.xml.zst
dnf95%

ghc-Cabal-doc 3.12.1.0-155.fc45

Haskell Cabal library documentation

https://haskell.org/ghc/

sudo dnf install ghc-Cabal-doc
  • License: BSD-3-Clause
  • Category: Unspecified
  • Architecture: noarch
  • Source Package: ghc
  • 1 依赖
  • 1 提供
  • normalized package name match
  • 匹配方式:Ghc
Fedora Rawhide package metadata · dl.fedoraproject.org · Fedora Rawhide package metadata: ghc-Cabal-doc from https://dl.fedoraproject.org/pub/fedora/linux/development/rawhide/Everything/x86_64/os/repodata/e5ca8ce900cd68f5419e1c39ae517343100b306336cbaeb70a3c153121d95094-primary.xml.zst
dnf95%

ghc-Cabal-prof 3.12.1.0-155.fc45

Haskell Cabal profiling library

https://haskell.org/ghc/

sudo dnf install ghc-Cabal-prof
  • License: BSD-3-Clause
  • Category: Unspecified
  • Architecture: x86_64
  • Source Package: ghc
  • 2 依赖
  • 2 提供
  • normalized package name match
  • 匹配方式:Ghc
Fedora Rawhide package metadata · dl.fedoraproject.org · Fedora Rawhide package metadata: ghc-Cabal-prof from https://dl.fedoraproject.org/pub/fedora/linux/development/rawhide/Everything/x86_64/os/repodata/e5ca8ce900cd68f5419e1c39ae517343100b306336cbaeb70a3c153121d95094-primary.xml.zst
dnf95%

ghc-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
  • License: BSD-3-Clause
  • Category: Unspecified
  • Architecture: x86_64
  • Source Package: ghc
  • 27 依赖
  • 2 提供
  • normalized package name match
  • 匹配方式:Ghc
Fedora Rawhide package metadata · dl.fedoraproject.org · Fedora Rawhide package metadata: ghc-Cabal-syntax from https://dl.fedoraproject.org/pub/fedora/linux/development/rawhide/Everything/x86_64/os/repodata/e5ca8ce900cd68f5419e1c39ae517343100b306336cbaeb70a3c153121d95094-primary.xml.zst

来源线索

由仓库数据生成

此页面由 av-webscripts/generate-pkg-sqlite.py 生成的私有软件包 SQLite 工件提供。

使用的来源

  • Geiger risk classifier
  • Nucleus package database
  • av.db category and tag curation
  • cross-ecosystem install command graph
  • curated package history
  • external package-manager database matches
  • package relationship graph
  • package version freshness
  • package-page enrichment