From 4417e33ea9d49a2001091adb4d2b19ebdefe5795 Mon Sep 17 00:00:00 2001 From: Hubert Plociniczak Date: Mon, 17 Oct 2016 16:58:53 +0200 Subject: [PATCH] Use bind function instead of pattern matching --- src/Text/Pandoc/Shared.hs | 5 +---- 1 file changed, 1 insertion(+), 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