wiki:Commentary/SourceTree

Version 6 (modified by simonmar, 8 years ago) (diff)

--

GHC Source Tree Roadmap

The top level of a GHC source tree looks like this:

Documentation

ANNOUNCE
HACKING
LICENSE
README

Configuration

The GNU autoconf machinery:

aclocal.m4
config.guess
config.sub
configure.ac
install-sh

The Build System

See Building/BuildSystem?.

Makefile
Top-level Makefile; make by itself does a full 2-stage bootstrap of GHC, there are also targets for building source and binary distributions. GHC requires GNU make.
mk/
The guts of the build system itself.

The Code

compat/
A library of compatibility code used when bootstrapping GHC using an older version of GHC. For example, we compile up the version of Cabal from libraries/Cabal and include it in libcompat, this means that the GHC source code can assume the most recent version of Cabal.
compiler/?
The Compiler itself: all Haskell code.
driver/
Historically this contained the Perl script known as the GHC "driver"; in GHC 5.00 the driver was rewritten in Haskell and incorporated into GHC itself when we added GHCi and --make. This directory still contains the mangler? and the splitter? Perl scripts, and a couple of wrappers used to invoke GHC on Windows. Also the package database constructed during a GHC build is stored in here.
libraries/?
The libraries that are built and distributed with GHC.
includes/
Header files for the Runtime System and for compiling Haskell via C.
docs/?
GHC documentation.
quickcheck/
Some quickcheck tests for the compiler (may go away).
rts/
The Runtime System.
utils/?
Various utility programs, either used during the build itself or distributed with GHC.

These two are optional, available as separate darcs repositories:

testsuite/?
The test suite.
nofib/?
The NoFib? benchmark suite.

Distribution

darcs-all
a script for operating on the collection of darcs repositories that makes up the GHC source tree (see Building/GettingTheSources).
distrib/
miscellany for building distributions.
ghc.spec.in
RPM spec file
InstallShield, WindowsInstaller
Windows installer bits