Go to the first, previous, next, last section, table of contents.
GHC keeps a version number on each interface file, and on each type
signature within the interface file. It also keeps in every interface
file a list of the version numbers of everything it used when it last
compiled the file. If the source file's modification date is earlier
than the `.o' file's date (i.e. the source hasn't changed since the
file was last compiled), and you give GHC the `-recomp' flag, then GHC
will be clever. It compares the version numbers on the things it
needs this time with the version numbers on the things it needed last
time (gleaned from the interface file of the module being compiled);
if they are all the same it stops compiling rather early in the
process saying "Recompilation not required". What a beautiful
sight!
It's still an experimental feature (that's why `-recomp' is off by
default), so tell us if you think it doesn't work.
Patrick Sansom has a workshop paper about how all this is
done. Ask him (email: `sansom') if you want a copy.
Go to the first, previous, next, last section, table of contents.