The Glorious Glasgow Haskell Compiler.
  • Haskell 82.2%
  • C 8.8%
  • HTML 2.1%
  • Terra 1.6%
  • Makefile 0.9%
  • Other 3.9%
Find a file
2026-07-10 11:09:25 -04:00
.gitlab Add item to MR checklist asking to squash fixup commits after approval 2026-07-08 04:49:26 -04:00
bindisttest Drop make build system 2022-08-25 20:05:31 -04:00
changelog.d driver: enable -finter-module-far-jumps by default 2026-07-10 11:08:38 -04:00
compiler [Fix #27287] preserve ModBreaks in ModIface 2026-07-10 11:09:25 -04:00
distrib hadrian: Build stage 2 cross compilers 2026-06-20 23:42:52 +02:00
docs driver: enable -finter-module-far-jumps by default 2026-07-10 11:08:38 -04:00
driver Tree-wide cleanup of cygwin logic 2026-01-14 03:55:31 -05:00
ghc Remove deprecated flag -ddump-json (see #24113) 2026-06-26 20:57:10 -04:00
hadrian hadrian: binary-dist-dir should not be the default target 2026-07-09 09:23:25 -04:00
libraries ghc-heap: fix invalid srtlen returned by peekItbl when no-TNTC 2026-07-08 16:54:09 -04:00
linters make: remove unused Makefiles from legacy make build system 2026-01-08 06:24:31 -05:00
m4 hadrian: Fill in more of the default.host toolchain file 2026-06-20 23:41:13 +02:00
mk Support statically linking executables properly 2026-01-09 02:48:53 -05:00
nofib@ae985b599e Bump nofib submodule. 2026-03-11 15:02:16 -04:00
rts Fix a profiling race condition resulting in segfaults. 2026-07-08 16:53:27 -04:00
testsuite [Fix #27287] preserve ModBreaks in ModIface 2026-07-10 11:09:25 -04:00
utils EPA: Replace AnnListItem with simply [TrailingAnn] 2026-07-09 09:24:12 -04:00
.editorconfig chore: extend .editorconfig for C files 2022-10-04 20:34:10 -04:00
.ghcid ghcid: use multi repl for ghcid 2024-10-27 05:36:38 -04:00
.git-blame-ignore-revs git-blame-ignore-revs: Ignore haddock reformatting 2024-05-17 11:41:20 -04:00
.git-ignore-revs git: Add ignored commits file 2020-05-23 13:41:03 -04:00
.gitattributes configure: remove unused win32-tarballs.md5sum 2025-12-22 17:12:00 -05:00
.gitignore .gitignore: Add the hadrian system.config introduced by commit 23c9b6c392 2026-07-09 09:23:25 -04:00
.gitlab-ci.yml ci: don't fail nightly if there have been no changes that night 2026-07-07 16:59:16 -04:00
.gitmodules libraries/unix: in submodule, don't pick branch 2.7 2026-05-26 11:03:40 -04:00
.mailmap mailmap: Use ben@well-typed.com more liberally 2025-08-20 11:48:31 -04:00
boot Hadrian: convert env variable ACLOCAL_PATH to unix paths. 2026-06-04 10:10:19 +00:00
cabal.project-reinstall compiler: remove iserv and only use on-demand external interpreter 2026-01-13 12:42:44 -05:00
CODEOWNERS compiler: remove iserv and only use on-demand external interpreter 2026-01-13 12:42:44 -05:00
compile_flags.txt devx: minor fixes for compile_flags.txt 2025-12-04 04:38:09 -05:00
config.guess Update autoconf scripts 2026-01-17 13:16:50 -05:00
config.sub Update autoconf scripts 2026-01-17 13:16:50 -05:00
configure.ac hadrian: Build stage 2 cross compilers 2026-06-20 23:42:52 +02:00
ghc-interp.js JS: implement TH support 2023-06-21 12:04:59 -04:00
HACKING.md Update the outdated instructions in HACKING.md on how to compile GHC 2023-06-08 18:41:29 -04:00
hie.yaml Revert accidental changes to hie.yaml 2025-09-02 12:20:40 -04:00
install-sh Update aux files config.{guess,sub} and install-sh 2013-11-08 00:39:28 +01:00
INSTALL.md docs: Update INSTALL.md 2023-01-25 03:54:14 -05:00
LICENSE Reorganisation of the source tree 2006-04-07 02:05:11 +00:00
llvm-passes compiler: use -O3 as LLVM optimization level for ghc -O2 2026-01-08 06:25:13 -05:00
llvm-targets ci: update darwin boot ghc to 9.10.3 2026-01-27 21:51:23 -05:00
packages Use libffi-clib 2026-01-14 11:11:31 -05:00
README.md README: Add note on ghc.nix 2025-08-06 15:51:28 -04:00
validate boot: cleanup legacy args 2022-08-26 15:06:40 -04:00

The Glasgow Haskell Compiler

pipeline status

This is the source tree for GHC, a compiler and interactive environment for the Haskell functional programming language.

For more information, visit GHC's web site.

Information for developers of GHC can be found on the GHC issue tracker, and you can also view proposals for new GHC features.

Getting the Source

There are two ways to get a source tree:

  1. Download source tarballs

    Download the GHC source distribution:

    ghc-<version>-src.tar.xz
    

    which contains GHC itself and the "boot" libraries.

  2. Check out the source code from git

    $ git clone --recurse-submodules git@gitlab.haskell.org:ghc/ghc.git
    

    Note: cloning GHC from Github requires a special setup. See Getting a GHC repository from Github.

See the GHC team's working conventions regarding how to contribute a patch to GHC. First time contributors are encouraged to get started by just sending a Merge Request.

Building & Installing

For full information on building GHC, see the GHC Building Guide. Here follows a summary - if you get into trouble, the Building Guide has all the answers.

Before building GHC you may need to install some other tools and libraries. See, Setting up your system for building GHC.

NB. In particular, you need GHC installed in order to build GHC, because the compiler is itself written in Haskell. You also need Happy, Alex, and Cabal. For instructions on how to port GHC to a new platform, see the GHC Building Guide.

For building library documentation, you'll need Haddock. To build the compiler documentation, you need Sphinx and Xelatex (only for PDF output).

Quick start: GHC is built using the Hadrian build system. The following gives you a default build:

$ ./boot
$ ./configure
$ hadrian/build         # can also say '-jX' for X number of jobs

On Windows, you need an extra repository containing some build tools. These can be downloaded for you by configure. This only needs to be done once by running:

$ ./configure --enable-tarballs-autodownload

Additionally, on Windows, to run Hadrian you should run hadrian/build.bat instead of hadrian/build.

(NB: Do you have multiple cores? Be sure to tell that to hadrian! This can save you hours of build time depending on your system configuration, and is almost always a win regardless of how many cores you have. As a simple rule, you should have about N+1 jobs, where N is the amount of cores you have.)

The ./boot step is only necessary if this is a tree checked out from git. For source distributions downloaded from GHC's web site, this step has already been performed.

These steps give you the default build, which includes everything optimised and built in various ways (eg. profiling libs are built). It can take a long time. To customise the build, see the file HACKING.md.

Nix

If you are looking to use nix to develop on GHC, check out the wiki for instructions.

Filing bugs and feature requests

If you've encountered what you believe is a bug in GHC, or you'd like to propose a feature request, please let us know! Submit an issue and we'll be sure to look into it. Remember: Filing a bug is the best way to make sure your issue isn't lost over time, so please feel free.

If you're an active user of GHC, you may also be interested in joining the glasgow-haskell-users mailing list, where developers and GHC users discuss various topics and hang out.

Hacking & Developing GHC

Once you've filed a bug, maybe you'd like to fix it yourself? That would be great, and we'd surely love your company! If you're looking to hack on GHC, check out the guidelines in the HACKING.md file in this directory - they'll get you up to speed quickly.

Governance and Acknowledgements

GHC is a community project developed by a team of highly-talented researchers, individual contributors, and full-time developers. We are indebted to the many people whose work has brought GHC to its current state.

Some larger decisions are made by a smaller group of core contributors, as described in our governance documentation.