ghc --make feature request

Carl R. Witty cwitty@newtonlabs.com
29 Oct 2001 09:42:41 -0800


"Simon Marlow" <simonmar@microsoft.com> writes:

> > 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:
> > 
> > I change C
> > ghc --make A compiles C, B, and A
> > I change A
> > ghc --make A skips C and compiles B and A
> > 
> > I don't know of any reason why it would have compiled B in the second
> > case.
> > 
> > If this is not a known bug, I can try to reproduce it and submit a
> > formal bug report.

By the way, a quick try at reproducing this bug -- with what I
remember of the sequence of events that caused it -- didn't work;
things proceeded as they should have.

> 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?

No.

Carl Witty