From 3428248debb14066e7fb1ef216927d3d62e3a43a Mon Sep 17 00:00:00 2001 From: John MacFarlane Date: Thu, 18 Mar 2021 23:01:12 -0700 Subject: Use minimumDef instead of minimum (partial function). --- src/Text/Pandoc/Writers/Powerpoint/Output.hs | 7 ++----- 1 file changed, 2 insertions(+), 5 deletions(-) (limited to 'src/Text/Pandoc/Writers/Powerpoint') diff --git a/src/Text/Pandoc/Writers/Powerpoint/Output.hs b/src/Text/Pandoc/Writers/Powerpoint/Output.hs index 5caeb0753..b26a7ff3e 100644 --- a/src/Text/Pandoc/Writers/Powerpoint/Output.hs +++ b/src/Text/Pandoc/Writers/Powerpoint/Output.hs @@ -50,6 +50,7 @@ import Text.Pandoc.Writers.Math (convertMath) import Text.Pandoc.Writers.Powerpoint.Presentation import Text.Pandoc.Shared (tshow) import Skylighting (fromColor) +import Safe (minimumDef) -- |The 'EMU' type is used to specify sizes in English Metric Units. type EMU = Integer @@ -1427,11 +1428,7 @@ presentationToRels pres@(Presentation _ slides) = do -- all relWithoutSlide rels (unless they're 1) -- 3. If we have a notesmaster slide, we make space for that as well. - let minRelNotOne = case filter (1<) $ map relId relsWeKeep of - [] -> 0 -- doesn't matter in this case, since - -- there will be nothing to map the - -- function over - l -> minimum l + let minRelNotOne = minimumDef 0 $ filter (1 <) $ map relId relsWeKeep modifyRelNum :: Int -> Int modifyRelNum 1 = 1 -- cgit v1.2.3