> I'm not sure if this is Known Deficiency or not, but ghc-2.09 -recomp
> still seems to get confused when new exported items have been added to
> a module, on which the -recomp'd module depends. It misses any (or
> at least, some) name-clashes, until some later point when recompilation
> is forced, only at which point is the "old" bug discovered.
Aha! Now I see what is going on. Your modules are
module A where
import B
f = h
module B where
h = True
Suppose I've compiled everything up, and then I add a
new definition to module B:
f = True
Now if I recompile A I'll get a name clash.
The recompilation checker doesn't spot this, because it very
cleverly records exactly which pieces of B was used when
compiling A. In this case, it'll record that B.h was used,
and that's all. So when "f" is added to B, the recompilation
checker decides that A doesn't care.
Usually this is good. It's nice to avoid recompiling A if
stuff in B has changed that A does not use. (Yeah, the programmer
might have a more precise import list, but they never do.)
But in this case it's bad. I hadn't realised that. I'll
have to think what to do about it.
Thanks for the report.
Simon