]> gitweb @ CieloNegro.org - Rakka.git/blobdiff - Rakka/Wiki/Interpreter/Outline.hs
Applied HLint
[Rakka.git] / Rakka / Wiki / Interpreter / Outline.hs
index ef9c32058b03de0a69476090f2a7e8df07aa7d7e..983b4597cbb5d20d84c8bb878f2231bc0bf6b710 100644 (file)
@@ -27,15 +27,15 @@ mkOutline :: WikiPage -> BlockElement
 mkOutline tree = fst (mkOutline' emptyOutline 1 headings)
     where
       headings :: [BlockElement]
-      headings = concat (map collectInBlock tree)
+      headings = concatMap collectInBlock tree
 
       collectInBlock :: BlockElement -> [BlockElement]
       collectInBlock hd@(Heading _ _)
           = [hd]
       collectInBlock (Div _ xs)
-          = concat $ map collectInBlock $ catMaybes (map castToBlock xs)
+          = concatMap collectInBlock $ catMaybes (map castToBlock xs)
       collectInBlock (BlockCmd (BlockCommand _ _ xs))
-          = concat $ map collectInBlock xs
+          = concatMap collectInBlock xs
       collectInBlock _
           = []
 
@@ -82,7 +82,9 @@ mkOutline' soFar level (x:xs)
                        lastItem' = case lastItem of
                                      []   -> [Block nested]
                                      i:[] -> i ++ [Block nested]
+                                     _    -> undefined
 
                        soFar' = soFar { listItems = nonLastItems ++ [lastItem'] }
                    in
                      mkOutline' soFar' level ys
+        _ -> undefined
\ No newline at end of file