diff options
author | Hubert Plociniczak <hubert.plociniczak@gmail.com> | 2016-10-17 16:58:53 +0200 |
---|---|---|
committer | Hubert Plociniczak <hubert.plociniczak@gmail.com> | 2016-10-17 16:58:53 +0200 |
commit | 4417e33ea9d49a2001091adb4d2b19ebdefe5795 (patch) | |
tree | 52463c44960360cd4bc2ec883d6776f082636235 /src/Text/Pandoc | |
parent | 7234321e8f5e77422e2c1be7ac3264d302083767 (diff) | |
download | pandoc-4417e33ea9d49a2001091adb4d2b19ebdefe5795.tar.gz |
Use bind function instead of pattern matching
Diffstat (limited to 'src/Text/Pandoc')
-rw-r--r-- | src/Text/Pandoc/Shared.hs | 5 |
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 |