Version 11 (modified by guest, 10 years ago) (diff)

Spelling error

Getting a GHC source tree

The first thing to do is install darcs.

A source tree consists of the GHC repository, with a set of packages in the libraries directory. We supply a script to automate the checking out of packages, darcs-all. Checking out a tree goes like this:

  $ darcs get --partial
  $ cd ghc
  $ chmod +x ./darcs-all
  $ ./darcs-all get

If darcs-all fails with

  $ ./darcs-all
  ./darcs-all: 12: Syntax error: "(" unexpected

you need to invoke the script with bash explicitly, eg. bash darcs-all get.

NOTE: you really want --partial when grabbing GHC. There are some 13000 patches in the repository, which take a long time to download without --partial. The darcs-all script automatically adds --partial for the packages.

Optionally, you might want to grab the testsuite and benchmark suite too, which should also be sub-directories of ghc:

  $ darcs get --partial
  $ darcs get --partial

List of repositories

These darcs repositories are related to GHC: main GHC repository test suite benchmark suite

And the following repositories contain packages that are used to populate the libraries directory of a darcs checkout:

There are no branches currently; we will use CVS for the 6.4 branch until its end of life, and use darcs for future branches.

Pulling new patches

To update your tree from the master repositories, the quickest way is to use the darcs-all script:

  $ ./darcs-all pull -a

Submitting patches

To submit patches to the developers, please use darcs send. You don't need any special permission to do this.

Committing changes

If you have commit permission (pretty easy to get, just demonstrate your competence by sending us a patch or two first), then you can use darcs push to commit changes directly to the main repository.

  $ darcs push <account>

(change ghc to the name of the repository if you're pushing changes from one of the sub-repositories, like testsuite, or a package such as base. Note: darcs push requires that SSH is working and can log in to your account on

Do not forget to darcs record your changes first!

Please test changes before committing: you can run a cut-down version of the full test suite like this:

  $ cd testsuite
  $ make boot
  $ make fast

You need to have testsuite checked out, of course. Running make fast should only take a few minutes.