Skip to content

Embedding the GHC repo

Manuel M T Chakravarty edited this page Apr 19, 2015 · 2 revisions

The GHC distribution is wrapped into the Xcode subproject GHCBuild as part of GHC.framework project. It contains a fork of the GHC repo as a submodule (which, in turn, contains GHC library dependencies as nested submodules).

  • Currently (i.e., for HfM 1.0), we are using the version tagged GHC 7.8.4 in the 7.8 stable release branch in the GHC repo.
  • The origin for the ghc submodule is a GitHub fork of the main GHC repo (in the mchakravarty user). The origin for all of GHC's submodules (and other package dependencies) are the repos of the GHC user. If we need to patch any of the package dependencies, we will need to fork them, too.

In the 'ghc' submodule, to clone all dependencies, issue

./sync-all -r git://github.com/ghc get -b ghc-7.8

This will fail halfway through as (1) the -d ".git" (in sync-all) doesn't work in a submodule and (2) checking out nested submodules isn't correctly configured when cloning from GitHub. We fix the former by patching sync.all and the latter as follows:

Perform

git clone git://github.com/ghc/packages-PACKAGE.git libraries/PACKAGE

for each PACKAGE that is a submodule. And, then, run again

./sync-all -r git://github.com/ghc get -b ghc-7.8

to update the submodules and perform final checks.

NB: Information to GHC submodules is at the following GHC wiki page, but that information pertains to the current GHC master branch: https://ghc.haskell.org/trac/ghc/wiki/WorkingConventions/Git/Submodules#UsingtheGitHubGHCMirror

Clone this wiki locally