aboutsummaryrefslogtreecommitdiff
path: root/src/Text/Pandoc
diff options
context:
space:
mode:
authorJohn MacFarlane <jgm@berkeley.edu>2019-07-20 12:26:24 -0700
committerJohn MacFarlane <jgm@berkeley.edu>2019-07-20 12:26:24 -0700
commit8643361d2e78c6be3acd894e4b0dedb90c2fff45 (patch)
treed023d25fe07a0c5f756b98d4d2b648eb373c2321 /src/Text/Pandoc
parent465eeece6b5dcf74408d2f6ec45cf721307e9971 (diff)
downloadpandoc-8643361d2e78c6be3acd894e4b0dedb90c2fff45.tar.gz
Minor code clarity change.
Diffstat (limited to 'src/Text/Pandoc')
-rw-r--r--src/Text/Pandoc/App.hs16
1 files changed, 8 insertions, 8 deletions
diff --git a/src/Text/Pandoc/App.hs b/src/Text/Pandoc/App.hs
index f96f67314..92782742c 100644
--- a/src/Text/Pandoc/App.hs
+++ b/src/Text/Pandoc/App.hs
@@ -28,7 +28,7 @@ import Control.Monad
import Control.Monad.Trans
import Control.Monad.Except (throwError)
import qualified Data.ByteString as BS
-import qualified Data.ByteString.Lazy as B
+import qualified Data.ByteString.Lazy as BL
import Data.Char (toLower)
import Data.Maybe (fromMaybe, isJust, isNothing)
import qualified Data.Set as Set
@@ -112,7 +112,7 @@ convertWithOpts opts = do
return (x, rs)
case optLogFile opts of
Nothing -> return ()
- Just logfile -> B.writeFile logfile (encodeLogMessages reports)
+ Just logfile -> BL.writeFile logfile (encodeLogMessages reports)
let isWarning msg = messageVerbosity msg == WARNING
when (optFailIfWarnings opts && any isWarning reports) $
E.throwIO PandocFailOnWarningError
@@ -376,13 +376,13 @@ readSource src = case parseURI src of
readURI :: FilePath -> PandocIO Text
readURI src = UTF8.toText . fst <$> openURL src
-readFile' :: MonadIO m => FilePath -> m B.ByteString
-readFile' "-" = liftIO B.getContents
-readFile' f = liftIO $ B.readFile f
+readFile' :: MonadIO m => FilePath -> m BL.ByteString
+readFile' "-" = liftIO BL.getContents
+readFile' f = liftIO $ BL.readFile f
-writeFnBinary :: MonadIO m => FilePath -> B.ByteString -> m ()
-writeFnBinary "-" = liftIO . B.putStr
-writeFnBinary f = liftIO . B.writeFile (UTF8.encodePath f)
+writeFnBinary :: MonadIO m => FilePath -> BL.ByteString -> m ()
+writeFnBinary "-" = liftIO . BL.putStr
+writeFnBinary f = liftIO . BL.writeFile (UTF8.encodePath f)
writerFn :: MonadIO m => IO.Newline -> FilePath -> Text -> m ()
-- TODO this implementation isn't maximally efficient: