aboutsummaryrefslogtreecommitdiff
path: root/src/HaddockModuleTree.hs
diff options
context:
space:
mode:
authorsimonmar <unknown>2002-07-24 09:42:18 +0000
committersimonmar <unknown>2002-07-24 09:42:18 +0000
commit4d8d5e948cd6620ed923bf7b11ce408a728e3521 (patch)
tree07cdc2e4dde15cb1e3a212d7f22998198829e6b6 /src/HaddockModuleTree.hs
parent1d44cadf21cdf3d5437e6cd438723d9ce7c895e2 (diff)
[haddock @ 2002-07-24 09:42:17 by simonmar]
Patches to quieten ghc -Wall, from those nice folks at Galois.
Diffstat (limited to 'src/HaddockModuleTree.hs')
-rw-r--r--src/HaddockModuleTree.hs7
1 files changed, 4 insertions, 3 deletions
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]