summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJohn Ericson <John.Ericson@Obsidian.Systems>2019-09-06 22:11:53 (GMT)
committerMarge Bot <ben+marge-bot@smart-cactus.org>2019-09-12 08:53:13 (GMT)
commita06629b457f02256ffa73a42a24df6499433a42d (patch)
treeb2b1595c234365d7dfd6a1cf83d7b61862f4d1e7
parent98b0d6eeff5711e0872abd2ef2d1ee0269b662cf (diff)
downloadghc-a06629b457f02256ffa73a42a24df6499433a42d.zip
ghc-a06629b457f02256ffa73a42a24df6499433a42d.tar.gz
ghc-a06629b457f02256ffa73a42a24df6499433a42d.tar.bz2
Do not throw away backpack instantiations for module lookup cache
Currently, there is only one home package so this probably doesn't matter. But if we support multiple home packages, they could differ only in arguments (same indef component being applied). It looks like it used to be this way before 4e8a0607140b23561248a41aeaf837224aa6315b, but that commit doesn't seem to comment on this change in the particular. (It's main purpose is creating the InstalledUnitId and recategorizing the UnitId expressions accordingly.) Trying this as a separate commit for testing purposes. I leave it to others to decide whether this is a good change on its own.
-rw-r--r--compiler/main/Finder.hs2
1 files changed, 1 insertions, 1 deletions
diff --git a/compiler/main/Finder.hs b/compiler/main/Finder.hs
index dc0c87f..6d9956f 100644
--- a/compiler/main/Finder.hs
+++ b/compiler/main/Finder.hs
@@ -245,7 +245,7 @@ modLocationCache hsc_env mod do_this = do
mkHomeInstalledModule :: DynFlags -> ModuleName -> InstalledModule
mkHomeInstalledModule dflags mod_name =
- let iuid = fst (splitUnitIdInsts (thisPackage dflags))
+ let iuid = thisInstalledUnitId dflags
in InstalledModule iuid mod_name
-- This returns a module because it's more convenient for users