diff options
Diffstat (limited to 'src/Haddock/ModuleTree.hs')
-rw-r--r-- | src/Haddock/ModuleTree.hs | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/src/Haddock/ModuleTree.hs b/src/Haddock/ModuleTree.hs index 61812e3a..2a7fbfcc 100644 --- a/src/Haddock/ModuleTree.hs +++ b/src/Haddock/ModuleTree.hs @@ -23,7 +23,7 @@ data ModuleTree = Node String Bool (Maybe String) (Maybe (Doc Name)) [ModuleTree mkModuleTree :: Bool -> [(Module, Maybe (Doc Name))] -> [ModuleTree] -mkModuleTree showPkgs mods = +mkModuleTree showPkgs mods = foldr fn [] [ (splitModule mdl, modPkg mdl, short) | (mdl, short) <- mods ] where modPkg mod_ | showPkgs = Just (packageIdString (modulePackageId mod_)) @@ -52,5 +52,5 @@ mkSubTree (s:ss) pkg short = [Node s (null ss) Nothing Nothing (mkSubTree ss pkg splitModule :: Module -> [String] splitModule mdl = split (moduleNameString (moduleName mdl)) where split mod0 = case break (== '.') mod0 of - (s1, '.':s2) -> s1 : split s2 - (s1, _) -> [s1] + (s1, '.':s2) -> s1 : split s2 + (s1, _) -> [s1] |