Manually adding libraries to a GHC build

A GHC source tree for building usually comes with the core libraries, see Getting the sources. The darcs-all script also gets the "extra" libraries if you give the flag --extra. However, if you only need one particular library, you can use darcs to manually add it to the build. You need to know the directory name (i.e. the package name) of the library which you want to add.

Suppose you have downloaded a GHC source tree as advised:

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

You are now in directory ghc. Descend into libraries and issue a darcs get <repo> (where <repo> is the repository of the package you want to get, ending in the package <name>. A later ./darcs-all pull should now pull not only ghc and the core libraries, but also any library you have added like this.

  $ cd libraries
  $ darcs get<name>
  $ cd ..
  $ ./darcs-all pull

A list of available packages and their repositories can be found at DarcsRepositories. This page also tells you which libraries are core libraries and which are optional for a GHC build.

Last modified 10 years ago Last modified on Mar 3, 2010 9:44:52 PM