diff options
author | Simon Marlow <marlowsd@gmail.com> | 2010-06-22 08:41:50 +0000 |
---|---|---|
committer | Simon Marlow <marlowsd@gmail.com> | 2010-06-22 08:41:50 +0000 |
commit | ca857af46ba888ff8fec3f0e93ebbe3343b7abf8 (patch) | |
tree | e7fce517451bf77497642acf35a6bbed86aa1c57 /src | |
parent | c5c82400c682dab8f32abe334092010613964ec1 (diff) |
isLocalAndTypeInferenced: fix for local module names overlapping package modules
Diffstat (limited to 'src')
-rw-r--r-- | src/Haddock/Interface/Create.hs | 8 |
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, |