aboutsummaryrefslogtreecommitdiff
path: root/src/Text/Pandoc/Writers/Powerpoint/Output.hs
diff options
context:
space:
mode:
authorJohn MacFarlane <jgm@berkeley.edu>2021-03-18 23:01:12 -0700
committerJohn MacFarlane <jgm@berkeley.edu>2021-03-18 23:01:12 -0700
commit3428248debb14066e7fb1ef216927d3d62e3a43a (patch)
treeb25be4ecdf948a9e8813d9449874db8674e5c933 /src/Text/Pandoc/Writers/Powerpoint/Output.hs
parentf0e4b9cc3cde01d64e25d331c5b4f3d62d2129b5 (diff)
downloadpandoc-3428248debb14066e7fb1ef216927d3d62e3a43a.tar.gz
Use minimumDef instead of minimum (partial function).
Diffstat (limited to 'src/Text/Pandoc/Writers/Powerpoint/Output.hs')
-rw-r--r--src/Text/Pandoc/Writers/Powerpoint/Output.hs7
1 files changed, 2 insertions, 5 deletions
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