aboutsummaryrefslogtreecommitdiff
path: root/src/Haddock
diff options
context:
space:
mode:
authorNeil Mitchell <unknown>2008-06-18 11:29:46 +0000
committerNeil Mitchell <unknown>2008-06-18 11:29:46 +0000
commit9e70736bf57ff648feb892ee65500b29a0ad4381 (patch)
treed362d22ea6ca7a85c5a9d465cd1e118a40a8d1f5 /src/Haddock
parent43004293124cd3082ced37c1af5864b735a5768a (diff)
In Hoogle do not list things that are not local to this module
Diffstat (limited to 'src/Haddock')
-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]
---------------------------------------------------------------------