X-Git-Url: http://git.megacz.com/?a=blobdiff_plain;f=compiler%2Fmain%2FGHC.hs;h=74959fe4495fc9662d5a8db3186d71652c34a0fd;hb=20f9bf2e066bd22d15a72d6e5efe92c6323bcdbe;hp=0654323ade68c934425c8b6ebcd09ed475e96a61;hpb=26637fd8651f55fd424f3f6190220335ab5b80e9;p=ghc-hetmet.git diff --git a/compiler/main/GHC.hs b/compiler/main/GHC.hs index 0654323..74959fe 100644 --- a/compiler/main/GHC.hs +++ b/compiler/main/GHC.hs @@ -1849,7 +1849,9 @@ findModule' hsc_env mod_name maybe_pkg = res <- findImportedModule hsc_env mod_name Nothing case res of Found _ m | modulePackageId m /= this_pkg -> return m - -- not allowed to be a home module + | otherwise -> throwDyn (CmdLineError (showSDoc $ + text "module" <+> pprModule m <+> + text "is not loaded")) err -> let msg = cannotFindModule dflags mod_name err in throwDyn (CmdLineError (showSDoc msg))