From 5d676a2ed8035e0c114e0881352a2aa4c589b8ad Mon Sep 17 00:00:00 2001 From: David Waern Date: Tue, 24 Mar 2009 22:21:23 +0000 Subject: Fix warnings in H.B.DevHelp --- src/Haddock/Backends/DevHelp.hs | 18 +++++++++--------- 1 file changed, 9 insertions(+), 9 deletions(-) (limited to 'src/Haddock/Backends/DevHelp.hs') diff --git a/src/Haddock/Backends/DevHelp.hs b/src/Haddock/Backends/DevHelp.hs index 76f320b5..b7e2d72f 100644 --- a/src/Haddock/Backends/DevHelp.hs +++ b/src/Haddock/Backends/DevHelp.hs @@ -21,9 +21,9 @@ import qualified Data.Map as Map import Text.PrettyPrint ppDevHelpFile :: FilePath -> String -> Maybe String -> [Interface] -> IO () -ppDevHelpFile odir doctitle maybe_package modules = do +ppDevHelpFile odir doctitle maybe_package ifaces = do let devHelpFile = package++".devhelp" - tree = mkModuleTree True [ (ifaceMod mod, toDescription mod) | mod <- modules ] + tree = mkModuleTree True [ (ifaceMod iface, toDescription iface) | iface <- ifaces ] doc = text "" $$ (text "text doctitle<> @@ -48,7 +48,7 @@ ppDevHelpFile odir doctitle maybe_package modules = do ppNode ss (Node s leaf _ _short ts) = case ts of [] -> text "ppAttribs<>text "/>" - ts -> + _ -> text "ppAttribs<>text ">" $$ nest 4 (ppModuleTree (s:ss) ts) $+$ text "" @@ -64,11 +64,11 @@ ppDevHelpFile odir doctitle maybe_package modules = do -- reconstruct the module name index :: [(Name, [Module])] - index = Map.toAscList (foldr getModuleIndex Map.empty modules) + index = Map.toAscList (foldr getModuleIndex Map.empty ifaces) getModuleIndex iface fm = - Map.unionWith (++) (Map.fromListWith (flip (++)) [(name, [mod]) | name <- ifaceExports iface, nameModule name == mod]) fm - where mod = ifaceMod iface + Map.unionWith (++) (Map.fromListWith (flip (++)) [(name, [mdl]) | name <- ifaceExports iface, nameModule name == mdl]) fm + where mdl = ifaceMod iface ppList :: [(Name, [Module])] -> Doc ppList [] = empty @@ -77,7 +77,7 @@ ppDevHelpFile odir doctitle maybe_package modules = do ppList mdls ppReference :: Name -> [Module] -> Doc - ppReference name [] = empty - ppReference name (mod:refs) = - text "text (escapeStr (getOccString name))<>text"\" link=\""<>text (nameHtmlRef mod (nameOccName name))<>text"\"/>" $$ + ppReference _ [] = empty + ppReference name (mdl:refs) = + text "text (escapeStr (getOccString name))<>text"\" link=\""<>text (nameHtmlRef mdl (nameOccName name))<>text"\"/>" $$ ppReference name refs -- cgit v1.2.3