diff options
author | Edward Z. Yang <ezyang@cs.stanford.edu> | 2016-10-06 13:40:10 -0700 |
---|---|---|
committer | Edward Z. Yang <ezyang@cs.stanford.edu> | 2016-10-08 01:37:56 -0700 |
commit | 5bd8e8d30c046187f2804db3af1768ea8b07dc41 (patch) | |
tree | ecea3d97b4599e19893ff8b9ca6da3c51066b27b /compiler/main/Finder.hs | |
parent | 4e8a0607140b23561248a41aeaf837224aa6315b (diff) | |
download | haskell-5bd8e8d30c046187f2804db3af1768ea8b07dc41.tar.gz |
Make InstalledUnitId be ONLY a FastString.
It turns out that we don't really need to be able to
extract a ComponentId from UnitId, except in one case.
So compress UnitId into a single FastString.
The one case where we do need the ComponentId is when
we are compiling an instantiated version of a package;
we need the ComponentId to look up the indefinite
version of this package from the database. So now we
just pass it in as an argument -this-component-id.
Also: ghc-pkg now no longer will unregister a package if
you register one with the same package name, if the
instantiations don't match.
Cabal submodule update which tracks the same data type
change.
Signed-off-by: Edward Z. Yang <ezyang@cs.stanford.edu>
Diffstat (limited to 'compiler/main/Finder.hs')
-rw-r--r-- | compiler/main/Finder.hs | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/compiler/main/Finder.hs b/compiler/main/Finder.hs index 2bcdd3360c..d1bf1c8073 100644 --- a/compiler/main/Finder.hs +++ b/compiler/main/Finder.hs @@ -335,7 +335,7 @@ findPackageModule hsc_env mod = do -- for the appropriate config. findPackageModule_ :: HscEnv -> InstalledModule -> PackageConfig -> IO InstalledFindResult findPackageModule_ hsc_env mod pkg_conf = - ASSERT( installedModuleUnitId mod == installedPackageConfigId pkg_conf ) + ASSERT2( installedModuleUnitId mod == installedPackageConfigId pkg_conf, ppr (installedModuleUnitId mod) <+> ppr (installedPackageConfigId pkg_conf) ) modLocationCache hsc_env mod $ -- special case for GHC.Prim; we won't find it in the filesystem. |