ghc --make feature request

Simon Marlow
Fri, 26 Oct 2001 14:35:49 +0100

> I just wanted to make a feature request to ghc --make (there seem to
> have been a number of such...)
> I have a project currently consisting of 36 Haskell modules, and a
> number of support modules for those.
> Naturally, compiling this takes quite some time (even for ghc --make)
> especially considering that one of the modules is a happy-generated
> parser.
> When I make a bug fix in one of the modules early in the dependancy
> chain, this forces a recompile of all the modules above it,=20
> even if the
> modules interface hasn't changed.
> I would suggest that when ghc --make recompiles a module, it should
> compare the new interface with the old one, and if they are the same,
> doesn't force recompiliation of the modules that depend on it, but
> merely change the time on those files without actually compiling.

GHC actually has rather sophisticated recompilation checking which goes =
beyond just checking whether the interface changed - it keeps version =
information for each entity exported by a module and only recompiles if =
any of the entities actually used by the module have changed (this is =
described in the user's guide under the section on recompilation =

So the upshot is that what you're describing shouldn't happen, and it =
may be a bug.  Could you send us more info?