1 %************************************************************************
3 \section[recomp]{The GHC recompilation checker (and using `make')}
4 \index{recompilation checker}
5 \index{make and recompilation}
7 %************************************************************************
9 WIth the introduction of Haskell~1.3, the module system (nicely
10 improved, thank you very much) requires a substantially different
11 implementation, which we did (as of release GHC~2.01).
13 We have taken a fairly radical approach and implemented a ``go to the
14 horse's mouth'' scheme; that is, when seeking out information about an
15 entity \tr{Foo.bar}, GHC will always look in the interface for
16 \tr{Foo}---no matter what interface {\em told us} about \tr{Foo.bar}
17 (via re-exporting and whatnot).
19 This ``horse's mouth'' scheme removes some of the most unsavoury
20 aspects of GHC~0.2x's behaviour (because of picking up duff
21 information about re-exported entities). However, the keen-minded
22 user will see that it makes it difficult to maintain
23 \tr{make}-friendly dependencies between modules.
25 Enter the ``recompilation checker'', which you invoke merely by adding
26 a \tr{-recomp} option\index{-recomp option} to your GHC command line.
27 (You should also create ordinary `make' dependencies; there's an
28 example of how to do this in \sectionref{mkdependHS}.)
30 GHC will now start ``compiling'' much more often than in the old days,
31 but it will frequently bail out quickly, saying the recompile is
32 \tr{NOT NEEDED}. What a beautiful sight!
34 %The recompilation checker is not finished. Its main faults are:
35 %(a)~it doesn't yet do the right things for instance declarations;
36 %(b)~it doesn't do anything about pragmas (happily, GHC~2.01 doesn't
37 %produce any); (c)~it has no good solution for mutually-recursive
40 Patrick Sansom has a workshop paper about how all these things should
41 be done. Ask him (email: \tr{sansom}) if you want a copy.