[project @ 2003-06-16 15:31:13 by simonpj]
authorsimonpj <unknown>
Mon, 16 Jun 2003 15:31:13 +0000 (15:31 +0000)
committersimonpj <unknown>
Mon, 16 Jun 2003 15:31:13 +0000 (15:31 +0000)
commit76c6edcbde24c92a09642469d2bbe617278c391f
treee97fe1f9841d95c8b2f09d7dd64d62256854e69c
parent984c225de77786cdb289001082166e77cc3e8733
[project @ 2003-06-16 15:31:13 by simonpj]
----------------------------------
Fix the "no interface file" bug
----------------------------------

The problem was this.

* Module A imports module B

* ghc --make A

* Remove B.hs, B.hi, and edit A so that it doesn't import B

* ghc --make A

Then GHC would fail, saying it can't find an interface file for B.
Reason: when loading A.hi (loadOldIface) it makes a Name for the
usages it finds.  To make a Name for B things, it needs B's package;
but it can't find B.hi, so it bombs instead.

Solution: don't complain if loadOldIface fails; instead behave just like
if you can't find A.hi.

Fixes a long-standing infelicity.
ghc/compiler/typecheck/TcRnDriver.lhs