1 This directory contains the source for Glorious Glasgow Haskell
2 compiler proper, normally a binary called "hsc". The source is
3 organized into _one_ level of directories, and the literate Haskell
4 source files sit in those directories (i.e., */*.lhs).
6 The only "real" subdirectory is the tests/ directory [NB: not
7 distributed normally, but available to gluttons for punishment], which
8 includes some tests that we use to make sure we're not going
9 backwards. The subdirs of the test directory "match" the subdirs of
10 the main source directory; e.g., the desugarer is in subdir deSugar/,
11 and the tests for the desugarer are in tests/deSugar/.
13 The main information about how the compiler goes together is in
14 ./Jmakefile. The list of modules under "FRONTSRCS_LHS =",
15 "TCSRCS_LHS =", etc., should show the basic organization of the (many)
18 TO ADD A MODULE TO THE COMPILER:
20 0. Be familiar with "How to add an optimisation pass..." (in
21 ghc/docs/add_to_compiler).
23 1. Create an appropriately-named module in an appropriate subdirectory.
25 2. Edit the Jmakefile:
27 * If you created a new subdirectory for the module, add that
28 directory to the SUBDIR_LIST and DASH_I_SUBDIR_LIST lists.
30 * Add your module to one of the lists of modules in the compiler;
33 3. Re-make the Makefile: "make Makefile"
35 4. Re-make the automatically-generated dependencies: "make depend".
37 Your new module is now "wired in" and you may proceed normally...
41 (see also: day-to-day make-worlding section of developer's guide, near
44 5. If you want to set up automagically (re-)runnable tests, follow
45 the suggests in the file tests/README.