ghc --make feature request

Simon Marlow
Fri, 26 Oct 2001 15:09:47 +0100

> "Simon Marlow" <> writes:
> > 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
> > So the upshot is that what you're describing shouldn't=20
> happen, and it
> > may be a bug.  Could you send us more info?
> Note that in GHC, the "version number" of a function can often change
> for hard-to-spot reasons.  You just need to change (for example) the
> strictness properties of the function, which can be very easy to do
> when making changes to your code.  The compiler cares about (much)
> more than just the types of imported objects.  I tend to expect
> recompiles whenever something depends on a function I've changed, even
> if I don't think the changes were very significant.

Good point.  But I'd also like to add that these hard-to-spot reasons
only apply when optimisation is turned on - otherwise the only way a
function's version number may change is if its type changes.  In GHCi,
optimisation is never on so you shouldn't see any of these effects.