wiki:Repositories

GHC Repositories

This page lists the active repositories relating to GHC. These are Git repositories, so you should learn about Git first. For instructions on actually getting a GHC source tree, see Getting The Sources. For information on using these repositories (via submodules), see the Submodules page.

git.haskell.org

Many GHC repositories and its core packages can be found at git.haskell.org, which can be accessed via,

  • https://git.haskell.org
  • git://git.haskell.org
  • git@git.haskell.org (for those with commit access)

The SSH host keys of git.haskell.org are,

  • ecdsa: 91:4e:95:fa:2e:34:6c:ba:68:af:71:29:ba:66:12:b0
  • rsa: 08:63:b5:86:3e:ae:e2:3c:b1:ea:c6:05:2d:71:db:5a

Repository listing

The GHC source code uses many related sub-repositories, which are needed for external dependencies during the build, or tools that are included in the build. Every single upstream repository we track is tracked with a git submodule, so that for any particular GHC commit, Git's submodule mechanism makes it possible to check out exactly the right version of each sub-repository.

Some submodules are maintained by GHC HQ, and some by their parties. You can find out by looking at the .cabal file.

Here is the setup in more detail:

  • Upstream repo.
    • Each submodule has an upstream, or master, repository.
    • Patches to the submodule must be pushed to the upstream repo.
    • The authoritative info for the upstream URL is in the file packages in the root directory of the main GHC repo.
    • If the packages file gives an upstream URL of "-", authoritative info is in the file .gitmodules.
  • Mirror repo.
    • If the upstream repo is not at git.haskell.org, then we maintain a mirror repo at git.haskell.org.
    • Pulling and cloning happens from the mirror repo, so that we can build GHC without relying on lots of other machines being up.
    • The mirror should be updated from the upstream repo at least every minute or so.
    • The authoritative info for the mirror URL is in the file .gitmodules in the root directory of the main GHC repo.
  • Upstream GHC branch (see table below).
    • As GHC's HEAD moves on between releases, there is often a need to update a library in sync. Each library has a named branch, the upstream GHC branch to which patches can be pushed.
    • If the library author is actively developing the library, he or she will typically do so on a different branch from the upstream GHC branch, to avoid discombobulating GHC HEAD.
  • Updating sub-repos. If you want to update a library to track some change in GHC HEAD, the sequence typically looks like this:
    • cd libraries/parallel
    • git checkout master, or whatever the "upstream GHC branch" is called. Previously the submodule would be in a detached-head state.
    • Make modifications to the library
    • git push: push the patch to the upstream repo (may need to ask the maintainer to do this)
    • cd ../..: back into the GHC directory
    • git add libraries/parallel: record the new library commit in the main GHC repo.
    • git push, with a commit message mentioning the word "submodule"

More details in the Submodules page

Here are the submodules we use, and where their upstreams point:

Location in tree Upstream repo Upstream GHC branch Installed[1] Req'd to build[2]
utils/hsc2hs https://git.haskell.org/hsc2hs.git master Yes Yes
utils/haddock https://github.com/haskell/haddock ghc-head Yes No
nofib https://git.haskell.org/nofib.git master N/A N/A
libraries/array https://git.haskell.org/packages/array.git master Yes Yes
libraries/binary https://github.com/kolmodin/binary master Yes Yes
libraries/bytestring https://github.com/haskell/bytestring master Yes Yes
libraries/Cabal https://github.com/haskell/Cabal master Yes Yes
libraries/containers https://github.com/haskell/containers master Yes Yes
libraries/deepseq https://github.com/haskell/deepseq master No No
libraries/directory https://github.com/haskell/directory master Yes Yes
libraries/filepath https://github.com/haskell/filepath master Yes Yes
libraries/haskeline https://github.com/judah/haskeline master Yes Yes
libraries/haskell98 https://git.haskell.org/packages/haskell98.git master Yes Yes
libraries/haskell2010 https://git.haskell.org/packages/haskell2010.git master Yes Yes
libraries/hoopl https://git.haskell.org/packages/hoopl.git master Yes Yes
libraries/hpc https://git.haskell.org/packages/hpc.git master Yes Yes
libraries/old-locale https://git.haskell.org/packages/old-locale.git master Yes Yes
libraries/old-time https://git.haskell.org/packages/old-time.git master Yes Yes
libraries/process https://github.com/haskell/process master Yes Yes
libraries/terminfo https://github.com/judah/terminfo master Yes Yes
libraries/time https://github.com/haskell/time ghc Yes Yes
libraries/unix https://github.com/haskell/unix master Yes Yes
libraries/Win32 https://github.com/haskell/win32 master Yes Yes
libraries/xhtml https://github.com/haskell/xhtml master Yes Yes
libraries/random https://github.com/haskell/random master No No
libraries/primitive https://github.com/haskell/primitive master No No
libraries/vector https://github.com/haskell/vector master No No
libraries/dph https://git.haskell.org/packages/dph.git master No No
libraries/parallel https://github.com/haskell/parallel master No No
libraries/stm https://git.haskell.org/packages/stm.git master No No
  • [1] These libraries are not installed in the resulting compiler when you do make install
  • [2] These libraries are not required to build the compiler, but may be used for tests or other libraries. Right now, most of these are based on whether you build DPH. At the moment, DPH is turned off. To build these libraries, set BUILD_DPH=YES in mk/build.mk. You can skip haddock by setting HADDOCK_DOCS=NO in mk/build.mk. TODO Explain how to skip deepseq, since it seems to only be used for tests.

The table above is maintained manually and can sometimes get out of sync. If in doubt, the primary data source is the packages file in the top-level ghc.git repo folder.

Infrastructure

There are a also a variety of repositories which contain infrastructure-related bits. These include,

Last modified 5 months ago Last modified on May 10, 2017 1:00:33 PM