diff options
-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, |