aboutsummaryrefslogtreecommitdiff
path: root/src/Text/Pandoc
diff options
context:
space:
mode:
authorHubert Plociniczak <hubert.plociniczak@gmail.com>2016-10-17 16:58:53 +0200
committerHubert Plociniczak <hubert.plociniczak@gmail.com>2016-10-17 16:58:53 +0200
commit4417e33ea9d49a2001091adb4d2b19ebdefe5795 (patch)
tree52463c44960360cd4bc2ec883d6776f082636235 /src/Text/Pandoc
parent7234321e8f5e77422e2c1be7ac3264d302083767 (diff)
downloadpandoc-4417e33ea9d49a2001091adb4d2b19ebdefe5795.tar.gz
Use bind function instead of pattern matching
Diffstat (limited to 'src/Text/Pandoc')
-rw-r--r--src/Text/Pandoc/Shared.hs5
1 files changed, 1 insertions, 4 deletions
diff --git a/src/Text/Pandoc/Shared.hs b/src/Text/Pandoc/Shared.hs
index 7e8cd571f..0760b49f8 100644
--- a/src/Text/Pandoc/Shared.hs
+++ b/src/Text/Pandoc/Shared.hs
@@ -1039,10 +1039,7 @@ filteredFilesFromArchive zf f =
mapMaybe (fileAndBinary zf) (filter f (filesInArchive zf))
where
fileAndBinary :: Archive -> FilePath -> Maybe (FilePath, BL.ByteString)
- fileAndBinary a fp =
- case findEntryByPath fp a of
- Just e -> Just (fp, fromEntry e)
- Nothing -> Nothing
+ fileAndBinary a fp = findEntryByPath fp a >>= \e -> Just (fp, fromEntry e)
---
--- Squash blocks into inlines