In lookupTopBndrRn, if we're in an interface file, then create the
binder in the cache with the correct Module (inc. package name) rather
than making a vanilla module as we do currently.
This helps to get the package names right in names from interfaces
that we've read via checkOldIface (ie. "skipped" modules), and fixes a
bug to do with unnecessary version bumping and recompilation.
(Simon P.J. will add a better comment later)
MERGE TO STABLE
| otherwise
= getModeRn `thenRn` \ mode ->
if isInterfaceMode mode
- then lookupIfaceName rdr_name
+ then lookupSysBinder rdr_name
else
getModuleRn `thenRn` \ mod ->
getGlobalNameEnv `thenRn` \ global_env ->