ghc: The GHC API

[ bsd3, development, library ] [ Propose Tags ] [ Report a vulnerability ]

GHC's functionality can be useful for more things than just compiling Haskell programs. Important use cases are programs that analyse (and perhaps transform) Haskell code. Others include loading Haskell code dynamically in a GHCi-like manner. For this reason, a lot of GHC's functionality is made available through this package.

See https://gitlab.haskell.org/ghc/ghc/-/wikis/commentary/compiler for more information.

This package is not PVP-compliant.

This package directly exposes GHC internals, which can and do change with every release.

Modules

[Index] [Quick Jump]

Flags

Manual Flags

NameDescriptionDefault
internal-interpreter

Build with internal interpreter support.

Disabled
dynamic-system-linker

The system can load dynamic code. This is not the case for musl.

Enabled
with-libzstdDisabled
static-libzstdDisabled
hadrian-stage0

Enable if compiling the stage0 compiler with hadrian

Disabled
bootstrap

Enabled when building the stage1 compiler in order to vendor the in-tree `ghc-boot-th` library, and through that the in-tree TH AST defintions from `ghc-internal`. See Note [Bootstrapping Template Haskell]

Disabled
Automatic Flags
NameDescriptionDefault
build-tool-depends

Use build-tool-depends

Enabled

Use -f <flag> to enable a flag, or -f -<flag> to disable that flag. More info

Downloads

Versions [RSS] 8.2.1, 8.2.2, 8.4.1, 8.4.3, 8.4.4, 8.6.1, 8.6.4, 8.6.5, 8.8.1, 8.8.3, 8.10.1, 8.10.2, 8.10.7, 9.0.2, 9.2.1, 9.2.2, 9.2.3, 9.2.3.20220620, 9.2.4, 9.2.5, 9.2.6, 9.2.7, 9.2.8, 9.4.1, 9.4.2, 9.4.3, 9.4.4, 9.4.5, 9.4.6, 9.4.7, 9.4.8, 9.6.1, 9.6.2, 9.6.3, 9.6.4, 9.6.5, 9.6.6, 9.6.7, 9.8.1, 9.8.2, 9.8.3, 9.8.4, 9.10.1, 9.10.2, 9.12.1, 9.12.2 (info)
Dependencies array (>=0.1 && <0.6), base (>=4.11 && <4.22), binary (>=0.8 && <0.9), bytestring (>=0.11 && <0.13), containers (>=0.6.2.1 && <0.8), deepseq (>=1.4 && <1.6), directory (>=1 && <1.4), exceptions (>=0.10 && <0.11), filepath (>=1.5 && <1.6), ghc-boot (==9.12.2), ghc-boot-th (==9.12.2), ghc-heap (==9.12.2), ghci (==9.12.2), hpc (>=0.6 && <0.8), os-string (>=2.0.1 && <2.1), process (>=1 && <1.7), semaphore-compat, stm, time (>=1.4 && <1.15), transformers (>=0.5 && <0.7), unix (>=2.7 && <2.9), Win32 (>=2.3 && <2.15) [details]
License BSD-3-Clause
Author The GHC Team
Maintainer glasgow-haskell-users@haskell.org
Category Development
Home page http://www.haskell.org/ghc/
Uploaded by BenGamari at 2025-06-16T15:02:43Z
Distributions Arch:9.4.8, Debian:8.10.7, Fedora:9.6.6, NixOS:9.6.6
Reverse Dependencies 327 direct, 14860 indirect [details]
Downloads 12500 total (129 in the last 30 days)
Rating 2.5 (votes: 6) [estimated by Bayesian average]
Your Rating
  • λ
  • λ
  • λ
Status Docs uploaded by user [build log]
All reported builds failed as of 2025-06-16 [all 1 reports]