projects
/
ghc-hetmet.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
f6613a3
)
findModule: add a fallthrough error case
author
Simon Marlow
<simonmar@microsoft.com>
Tue, 22 Aug 2006 11:24:09 +0000
(11:24 +0000)
committer
Simon Marlow
<simonmar@microsoft.com>
Tue, 22 Aug 2006 11:24:09 +0000
(11:24 +0000)
compiler/main/GHC.hs
patch
|
blob
|
history
diff --git
a/compiler/main/GHC.hs
b/compiler/main/GHC.hs
index
0654323
..
74959fe
100644
(file)
--- 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))