diff options
| author | John MacFarlane <jgm@berkeley.edu> | 2018-08-10 15:22:10 -0700 | 
|---|---|---|
| committer | John MacFarlane <jgm@berkeley.edu> | 2018-08-10 15:22:10 -0700 | 
| commit | 7a1ec21faac7d61782f1595b8bcc671139268e39 (patch) | |
| tree | b1f94f59ba94c9d3a6d64fc7ecb33c7b63cfaac7 | |
| parent | 0ae79275a980e158c3ac93df79ed33329150b7e0 (diff) | |
| download | pandoc-7a1ec21faac7d61782f1595b8bcc671139268e39.tar.gz | |
Avoid non-exhaustive pattern matches.
| -rw-r--r-- | src/Text/Pandoc/ImageSize.hs | 10 | 
1 files changed, 6 insertions, 4 deletions
| diff --git a/src/Text/Pandoc/ImageSize.hs b/src/Text/Pandoc/ImageSize.hs index 43d4877a0..d57f66da5 100644 --- a/src/Text/Pandoc/ImageSize.hs +++ b/src/Text/Pandoc/ImageSize.hs @@ -544,10 +544,12 @@ exifHeader hdr = do    let resfactor = case lookup ResolutionUnit allentries of                          Just (UnsignedShort 1) -> 100 / 254                          _ -> 1 -  let xres = maybe 72 (\(UnsignedRational x) -> floor $ x * resfactor) -             $ lookup XResolution allentries -  let yres = maybe 72 (\(UnsignedRational x) -> floor $ x * resfactor) -             $ lookup YResolution allentries +  let xres = case lookup XResolution allentries of +                  Just (UnsignedRational x) -> floor (x * resfactor) +                  _ -> 72 +  let yres = case lookup YResolution allentries of +                  Just (UnsignedRational y) -> floor (y * resfactor) +                  _ -> 72    return ImageSize{                      pxX  = wdth                    , pxY  = hght | 
