Use <$> instead of >>= and return (#6128)

This commit is contained in:
Joseph C. Sible
2020-02-08 09:12:01 -08:00
committed by GitHub
parent e97a99616e
commit 12c75701be
2 changed files with 2 additions and 2 deletions
+1 -1
View File
@@ -42,7 +42,7 @@ escapedQuote = string "\\\"" $> "\\\""
inQuotes :: Parser T.Text
inQuotes =
try escapedQuote <|> (anyChar >>= (\c -> return $ T.singleton c))
try escapedQuote <|> (T.singleton <$> anyChar)
quotedString :: Parser T.Text
quotedString = do
+1 -1
View File
@@ -92,7 +92,7 @@ testForWarningsWithOpts opts name docxFile expected =
getMedia :: FilePath -> FilePath -> IO (Maybe B.ByteString)
getMedia archivePath mediaPath = do
zf <- toArchive <$> B.readFile archivePath
return $ findEntryByPath ("word/" ++ mediaPath) zf >>= (Just . fromEntry)
return $ fromEntry <$> findEntryByPath ("word/" ++ mediaPath) zf
compareMediaPathIO :: FilePath -> MediaBag -> FilePath -> IO Bool
compareMediaPathIO mediaPath mediaBag docxPath = do