Version 17 (modified by igloo, 4 years ago) (diff)


GHC Repositories

This page lists the active repositories relating to GHC. For instructions on actually getting a GHC source tree, see Building/GettingTheSources. For read-only browsing, you can use the Trac source browser, or the GitHub mirror.

GHC's repos use Git; see WorkingConventions/Git. For Darcs-related stuff see also DarcsToGit and GitForDarcsUsers. For instructions for building from GitHub sources, see GitHubGHC.


A GHC source tree is made of a collection of repositories. The script sync-all knows how to apply git commands to the whole collection of repositories at once, for example to pull changes from the upstream repositories.

The root of the source tree is the GHC repository itself, the other repositories live in various subdirectories. The Master List of repositories is in the file source:packages, and this is where the sync-all script finds out about which repositories make up the complete tree.

The "tag" in the master table in source:packages has the following significance:

  • "-": boot libraries, necessary to build GHC
  • "testsuite": GHC's regression tests, necessary for a build, but is necessary if you're working on GHC
  • "nofib": GHC's nofib benchmark suite
  • "dph": packages for Data Parallel Haskell, which is not shipped with GHC but we test all changes to GHC against these repositories so they are usually included in a checked-out source tree.
  • "extra": extra packages you might want to include in a build (the parallel package, for example), but aren't necessary to get a working GHC.

Repository locations

Many of the libraries and tools in a GHC tree are actually maintained by someone else. They therefore have a separate upstream repository, from which we need to pull. That repository may be either a darcs or a git repository; in the darcs case, we also need to convert to a git repository for use in a GHC tree. However, if the darcs repository is on another server, then we first need to mirror it for the conversion program to use. This diagram shows how changes migrate from one repo to another:

No image "repos.png" attached to Repositories

This means that when making changes needed in GHC to one of these libraries, we first need to put the changes in the upstream repository. For example, to make a change to Cabal:

Note that a git hook prevents you from pushing patches to the ghc repos until they are already in the git mirror repos, so that we cannot forget to send changes upstream.

This table shows, for each repository in a GHC tree, where the central repository is, and what mirrors there are.

darcs upstreamdarcs mirrorgit upstreamgit mirrorghc (validated) repoin-tree
(pull) git://, (push)

Mirroring new packages to GitHub

Currently, all our repositories are being mirrored to GitHub by GitHub themselves. If you wish to add/remove a repository you need to email GitHub support at support@… and ask them to do it. Currently there is no way to administer this ourselves.


The following branches are active:

7.2 Branch