git.iko.soy/typeable/pandoc
on master help sign in
HLint: Use all
1ed2c46Henry de Valence
src/Text/Pandoc/Shared.hs+1−1
@@ -532,7 +532,7 @@ headerShift n = walk shift
532
532
533-- | Detect if a list is tight.
533-- | Detect if a list is tight.
534isTightList :: [[Block]] -> Bool
534isTightList :: [[Block]] -> Bool
535−isTightList = and . map firstIsPlain
535+isTightList = all firstIsPlain
536 where firstIsPlain (Plain _ : _) = True
536 where firstIsPlain (Plain _ : _) = True
537 firstIsPlain _ = False
537 firstIsPlain _ = False
538
538
src/Text/Pandoc/Writers/LaTeX.hs+4−4
@@ -443,7 +443,7 @@ blockToLaTeX (DefinitionList lst) = do
443 incremental <- gets stIncremental
443 incremental <- gets stIncremental
444 let inc = if incremental then "[<+->]" else ""
444 let inc = if incremental then "[<+->]" else ""
445 items <- mapM defListItemToLaTeX lst
445 items <- mapM defListItemToLaTeX lst
446− let spacing = if and $ map isTightList (map snd lst)
446+ let spacing = if all isTightList (map snd lst)
447 then text "\\itemsep1pt\\parskip0pt\\parsep0pt"
447 then text "\\itemsep1pt\\parskip0pt\\parsep0pt"
448 else empty
448 else empty
449 return $ text ("\\begin{description}" ++ inc) $$ spacing $$ vcat items $$
449 return $ text ("\\begin{description}" ++ inc) $$ spacing $$ vcat items $$
@@ -764,9 +764,9 @@ citationsToNatbib cits
764 | noPrefix (tail cits) && noSuffix (init cits) && ismode NormalCitation cits
764 | noPrefix (tail cits) && noSuffix (init cits) && ismode NormalCitation cits
765 = citeCommand "citep" p s ks
765 = citeCommand "citep" p s ks
766 where
766 where
767− noPrefix = and . map (null . citationPrefix)
767+ noPrefix = all (null . citationPrefix)
768− noSuffix = and . map (null . citationSuffix)
768+ noSuffix = all (null . citationSuffix)
769− ismode m = and . map (((==) m) . citationMode)
769+ ismode m = all (((==) m) . citationMode)
770 p = citationPrefix $ head $ cits
770 p = citationPrefix $ head $ cits
771 s = citationSuffix $ last $ cits
771 s = citationSuffix $ last $ cits
772 ks = intercalate ", " $ map citationId cits
772 ks = intercalate ", " $ map citationId cits