diff --git a/compiler/main/GhcMake.hs b/compiler/main/GhcMake.hs index 41d4f1c59251555aee941539361545eca0f37d2e..843def11920d948d81a8139259c637a99bda01e8 100644 --- a/compiler/main/GhcMake.hs +++ b/compiler/main/GhcMake.hs @@ -1886,13 +1886,11 @@ summariseModule hsc_env old_summary_map is_boot (L loc wanted_mod) | isJust (ml_hs_file location) -> -- Home package just_found location mod - | otherwise -> - -- Drop external-pkg - ASSERT(moduleUnitId mod /= thisPackage dflags) - return Nothing - err -> return $ Just $ Left $ noModError dflags loc wanted_mod err + _ -> return Nothing -- Not found + -- (If it is TRULY not found at all, we'll + -- error when we actually try to compile) just_found location mod = do -- Adjust location to point to the hs-boot source file, diff --git a/testsuite/tests/cabal/cabal07/cabal07.stderr b/testsuite/tests/cabal/cabal07/cabal07.stderr index 097f23fdc8c297271aa2c90bba5950cc7e3321dc..b3cfe5b15281bfe6641bafb54d96f5525ec44361 100644 --- a/testsuite/tests/cabal/cabal07/cabal07.stderr +++ b/testsuite/tests/cabal/cabal07/cabal07.stderr @@ -1,6 +1,6 @@ -Q.hs:3:8: error: - Could not find module ‘Data.Set’ - It is a member of the hidden package ‘containers-0.5.6.3@containers-0.5.6.3’. +Q.hs:3:1: error: + Failed to load interface for ‘Data.Set’ + It is a member of the hidden package ‘containers-0.5.7.0’. Perhaps you need to add ‘containers’ to the build-depends in your .cabal file. Use -v to see a list of the files searched for. diff --git a/testsuite/tests/driver/driver063.stderr b/testsuite/tests/driver/driver063.stderr index 25488b80e9be18d8b89fa0f9dd8db8f660f88f05..84ff5b6dbb712a1e456bcba188c57b2e88698192 100644 --- a/testsuite/tests/driver/driver063.stderr +++ b/testsuite/tests/driver/driver063.stderr @@ -1,4 +1,4 @@ -D063.hs:2:8: - Could not find module ‘A063’ +D063.hs:2:1: error: + Failed to load interface for ‘A063’ It is not a module in the current program, or in any known package. diff --git a/testsuite/tests/ghc-e/should_run/T2636.stderr b/testsuite/tests/ghc-e/should_run/T2636.stderr index 98c109e92d88a1b9b8debbb021f477f2f1f563d5..1a7912735c608ee9842ca9399181b25113563fdf 100644 --- a/testsuite/tests/ghc-e/should_run/T2636.stderr +++ b/testsuite/tests/ghc-e/should_run/T2636.stderr @@ -1,4 +1,4 @@ -T2636.hs:1:8: - Could not find module ‘MissingModule’ +T2636.hs:1:1: error: + Failed to load interface for ‘MissingModule’ Use -v to see a list of the files searched for.