Only look up whether a module's SOURCE-imported if it's in the current package
authorIan Lynagh <igloo@earth.li>
Thu, 13 Aug 2009 16:24:35 +0000 (16:24 +0000)
committerIan Lynagh <igloo@earth.li>
Thu, 13 Aug 2009 16:24:35 +0000 (16:24 +0000)
commit0e3d5132699d278ffd1aad10db16fe0c8495cfbd
tree6f58d90ef1e6f68f89e25b204584514cea57a231
parent2d1262b6acb5aac55777000806fc1b0e5ea57906
Only look up whether a module's SOURCE-imported if it's in the current package
Suppose we import anotherPackage:M, which exports things from
anotherPackage:Internal. Then GHC will want to read
anotherPackage:Internal.hi.

However, if we have also SOURCE-imported thisPackage:Internal then
we don't want GHC to try to read anotherPackage:Internal.hi-boot
instead.

The mapping that tells us whether a module is SOURCE-imported uses just
the module name for the key, so we have to check the package ID before
looking it up.

Fixes #3007.
compiler/iface/LoadIface.lhs