aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/Haddock/Backends/Hoogle.hs7
1 files changed, 6 insertions, 1 deletions
diff --git a/src/Haddock/Backends/Hoogle.hs b/src/Haddock/Backends/Hoogle.hs
index 94109d82..cd5e9161 100644
--- a/src/Haddock/Backends/Hoogle.hs
+++ b/src/Haddock/Backends/Hoogle.hs
@@ -22,6 +22,7 @@ import Control.Monad
import Data.Char
import Data.List
import Data.Maybe
+import qualified Data.Set as Set
import System.FilePath
@@ -43,8 +44,12 @@ ppHoogle package version ifaces odir = do
ppModule :: Interface -> [String]
ppModule iface = "" : doc (ifaceDoc iface) ++
["module " ++ moduleString (ifaceMod iface)] ++
- concatMap ppExport (ifaceExportItems iface) ++
+ concatMap ppExport exported ++
concatMap ppInstance (ifaceInstances iface)
+ where
+ locals = Set.fromList $ ifaceLocals iface
+ exported = [i | i@(ExportDecl{expItemName=name}) <- ifaceExportItems iface
+ , name `Set.member` locals]
---------------------------------------------------------------------