Skip to content
GitLab
Projects
Groups
Snippets
/
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Sign in / Register
Toggle navigation
Menu
Open sidebar
Alex D
GHC
Commits
2bad3deb
Commit
2bad3deb
authored
Aug 22, 2006
by
Simon Marlow
Browse files
findModule: add a fallthrough error case
parent
f6613a3a
Changes
1
Hide whitespace changes
Inline
Side-by-side
compiler/main/GHC.hs
View file @
2bad3deb
...
...
@@ -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
))
...
...
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment