aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorSimon Marlow <marlowsd@gmail.com>2010-06-22 08:41:50 +0000
committerSimon Marlow <marlowsd@gmail.com>2010-06-22 08:41:50 +0000
commitca857af46ba888ff8fec3f0e93ebbe3343b7abf8 (patch)
treee7fce517451bf77497642acf35a6bbed86aa1c57 /src
parentc5c82400c682dab8f32abe334092010613964ec1 (diff)
isLocalAndTypeInferenced: fix for local module names overlapping package modules
Diffstat (limited to 'src')
-rw-r--r--src/Haddock/Interface/Create.hs8
1 files changed, 6 insertions, 2 deletions
diff --git a/src/Haddock/Interface/Create.hs b/src/Haddock/Interface/Create.hs
index 224df2c4..c33e36cf 100644
--- a/src/Haddock/Interface/Create.hs
+++ b/src/Haddock/Interface/Create.hs
@@ -560,8 +560,12 @@ mkExportItems modMap this_mod gre exported_names decls declMap
-- But I might be missing something obvious. What's important
-- /here/ is that we behave reasonably when we run into one of
-- those exported type-inferenced values.
- isLocalAndTypeInferenced <- liftGhcToErrMsgGhc $
- isLoaded (moduleName (nameModule t))
+ isLocalAndTypeInferenced <- liftGhcToErrMsgGhc $ do
+ let mdl = nameModule t
+ if modulePackageId mdl == thisPackage dflags
+ then isLoaded (moduleName mdl)
+ else return False
+
if isLocalAndTypeInferenced
then do
-- I don't think there can be any subs in this case,