From 9e70736bf57ff648feb892ee65500b29a0ad4381 Mon Sep 17 00:00:00 2001 From: Neil Mitchell Date: Wed, 18 Jun 2008 11:29:46 +0000 Subject: In Hoogle do not list things that are not local to this module --- src/Haddock/Backends/Hoogle.hs | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) (limited to 'src') 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] --------------------------------------------------------------------- -- cgit v1.2.3