diff options
author | John MacFarlane <jgm@berkeley.edu> | 2021-03-18 23:01:12 -0700 |
---|---|---|
committer | John MacFarlane <jgm@berkeley.edu> | 2021-03-18 23:01:12 -0700 |
commit | 3428248debb14066e7fb1ef216927d3d62e3a43a (patch) | |
tree | b25be4ecdf948a9e8813d9449874db8674e5c933 /src/Text/Pandoc/Writers/Powerpoint | |
parent | f0e4b9cc3cde01d64e25d331c5b4f3d62d2129b5 (diff) | |
download | pandoc-3428248debb14066e7fb1ef216927d3d62e3a43a.tar.gz |
Use minimumDef instead of minimum (partial function).
Diffstat (limited to 'src/Text/Pandoc/Writers/Powerpoint')
-rw-r--r-- | src/Text/Pandoc/Writers/Powerpoint/Output.hs | 7 |
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 |