Use bind function instead of pattern matching

This commit is contained in:
Hubert Plociniczak 2016-10-17 16:58:53 +02:00
parent 7234321e8f
commit 4417e33ea9

View file

@ -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