ghc --make feature request

Simon Marlow simonmar@microsoft.com
Mon, 29 Oct 2001 16:51:23 -0000


> "Simon Marlow" <simonmar@microsoft.com> writes:
>=20
> > 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 checking).
>=20
> I've seen unexpected compiles using ghc --make.  I've got a system
> with modules A, B, and C; A depends on B and B depends on C.  I've
> seen the following sequence of events:
>=20
> I change C
> ghc --make A compiles C, B, and A
> I change A
> ghc --make A skips C and compiles B and A
>=20
> I don't know of any reason why it would have compiled B in the second
> case.
>=20
> If this is not a known bug, I can try to reproduce it and submit a
> formal bug report.

From your bug report on SourceForge, it looks like GHC has inferred the =
wrong dependency graph for your program.  It appears that Point.lhs =
doesn't depend on GtkExtra, but nevertheless GHC has decided to compile =
GtkExtra before Point, but after the other dependencies of Point, which =
would seem to indicate that it thinks Point depends on GtkExtra.

If you do a 'ghc --make Point.lhs' (with whatever other options you =
need), does it try to compile GtkExtra?

I tried a small example with similar module structure to your setup, but =
couldn't reproduce the bug.

Cheers,
	Simon