FIX #903: mkWWcpr: not a product
authorSimon Marlow <simonmar@microsoft.com>
Mon, 10 Sep 2007 10:38:30 +0000 (10:38 +0000)
committerSimon Marlow <simonmar@microsoft.com>
Mon, 10 Sep 2007 10:38:30 +0000 (10:38 +0000)
commit3b1438a9757639d7f37f10e1237e2369ca0ebe4a
treef06e4469a71c3158c1d895d574284e20ff7f1d88
parent37df27c6f21452c60c45b5cf6defc9003a41da15
FIX #903: mkWWcpr: not a product
This fixes the long-standing bug that prevents some code with
mutally-recursive modules from being compiled with --make and -O,
including GHC itself.  See the comments for details.

There are some additional cleanups that were forced/enabled by this
patch: I removed importedSrcLoc/importedSrcSpan: it wasn't adding any
useful information, since a Name already contains its defining Module.
In fact when re-typechecking an interface file we were wrongly
replacing the interesting SrcSpans in the Names with boring
importedSrcSpans, which meant that location information could degrade
after reloading modules.  Also, recreating all these Names was a waste
of space/time.
compiler/basicTypes/Name.lhs
compiler/basicTypes/SrcLoc.lhs
compiler/iface/LoadIface.lhs
compiler/main/GHC.hs
compiler/main/PprTyThing.hs
compiler/types/FamInstEnv.lhs
compiler/types/InstEnv.lhs