From 4d8d5e948cd6620ed923bf7b11ce408a728e3521 Mon Sep 17 00:00:00 2001 From: simonmar Date: Wed, 24 Jul 2002 09:42:18 +0000 Subject: [haddock @ 2002-07-24 09:42:17 by simonmar] Patches to quieten ghc -Wall, from those nice folks at Galois. --- src/HaddockModuleTree.hs | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) (limited to 'src/HaddockModuleTree.hs') diff --git a/src/HaddockModuleTree.hs b/src/HaddockModuleTree.hs index d8b46871..93f0f162 100644 --- a/src/HaddockModuleTree.hs +++ b/src/HaddockModuleTree.hs @@ -15,11 +15,12 @@ addToTrees (s1:ss) (t@(Node s2 leaf subs) : ts) | s1 == s2 = Node s2 (leaf || null ss) (addToTrees ss subs) : ts | otherwise = mkSubTree (s1:ss) ++ t : ts +mkSubTree :: [String] -> [ModuleTree] mkSubTree [] = [] mkSubTree (s:ss) = [Node s (null ss) (mkSubTree ss)] splitModule :: Module -> [String] -splitModule (Module mod) = split mod - where split mod = case break (== '.') mod of +splitModule (Module mdl) = split mdl + where split mdl0 = case break (== '.') mdl0 of (s1, '.':s2) -> s1 : split s2 - (s1, _) -> [s1] + (s1, _) -> [s1] -- cgit v1.2.3