diff options
author | Matthew Pickering <matthewtpickering@gmail.com> | 2021-04-14 10:04:10 +0100 |
---|---|---|
committer | Matthew Pickering <matthewtpickering@gmail.com> | 2021-04-15 03:50:54 -0400 |
commit | 9344a8e13a7833bfe673806af76b1f392f9006e4 (patch) | |
tree | d54680391c43f53df5916f1625d09d9f0424399c /compiler | |
parent | cc1ba576d26b90c0c01aa43e7100c94ee3a287ad (diff) | |
download | haskell-wip/rexport-fix.tar.gz |
Correct treatment of rexported modules in mkModuleNameProvidersMapwip/rexport-fix
Before we would get the incorrect error message saying that the
rexporting package was the same as the defining package.
I think this only affects error messages for now.
```
- it is bound as p-0.1.0.0:P2 by a reexport in package p-0.1.0.0
- it is bound as P by a reexport in package p-0.1.0.0
+ it is bound as p-0.1.0.0:P2 by a reexport in package q-0.1.0.0
+ it is bound as P by a reexport in package r-0.1.0.0
```
and the output of `-ddump-mod-map` claimed..
```
Moo moo-0.0.0.1 (hidden package, reexport by moo-0.0.0.1)
```
Diffstat (limited to 'compiler')
-rw-r--r-- | compiler/GHC/Unit/State.hs | 3 |
1 files changed, 1 insertions, 2 deletions
diff --git a/compiler/GHC/Unit/State.hs b/compiler/GHC/Unit/State.hs index fe4796d1fc..9e154152d7 100644 --- a/compiler/GHC/Unit/State.hs +++ b/compiler/GHC/Unit/State.hs @@ -1729,8 +1729,7 @@ mkModuleNameProvidersMap ctx cfg pkg_map closure vis_map = case exposedReexport of Nothing -> (pk, m, fromExposedModules e) Just (Module pk' m') -> - let pkg' = unit_lookup pk' - in (pk', m', fromReexportedModules e pkg') + (pk', m', fromReexportedModules e pkg) return (m, mkModMap pk' m' origin') esmap :: UniqFM ModuleName (Map Module ModuleOrigin) |