Fix a bug in the recompilation checking logic.
authorThomas Schilling <nominolo@googlemail.com>
Thu, 13 Nov 2008 16:26:53 +0000 (16:26 +0000)
committerThomas Schilling <nominolo@googlemail.com>
Thu, 13 Nov 2008 16:26:53 +0000 (16:26 +0000)
commit5c9424bb4f530c315d1dde2c53ebb1adfd3a2da4
tree14926d005c16254869899b79671957f8e56f4ff5
parentdddfba386d413d575c1d0be2a26f0cf1417fa5b6
Fix a bug in the recompilation checking logic.

Previously, using target HscNothing resulted in unnessesary
recompilation because 'upsweep_mod' treated HscInterface specially.
This patch changes relaxes this.

When running GHC with debug level 5, 'upsweep_mod' will now also be
more verbose about what it is doing.

There is (at least) one possible remaining problem, though: When using
target 'HscNothing' we generate a fake linkable to signal that we have
processed a module.  When switching to 'HscInterpreted' this may cause
objects to not be recompiled.  Switching from HscNothing to
HscInterpreted is therefore only safe if we unload everything first.
compiler/main/DynFlags.hs
compiler/main/GHC.hs