@@ -12,8 +12,7 @@ import Data.Maybe (fromMaybe)
1212import Control.Parallel.Strategies (rdeepseq, ($|))
1313import Control.Monad.Reader (liftIO)
1414import System.FilePath (takeExtension)
15−import System.IO (IOMode(..), openFile, hClose)
16−import qualified System.IO.UTF8 as U
15+import System.IO
1716
1817import Text.Pandoc
1918
@@ -93,18 +92,18 @@ cachePage page@(Page mapping) = do
9392
9493 writePageToCache = do
9594 handle <- openFile destination WriteMode
96− U.hPutStrLn handle "---"
95+ hPutStrLn handle "---"
9796 mapM_ (writePair handle) $ M.toList simpleMetaData
9897 mapM_ (writeSection handle) $ M.toList sectionMetaData
99− U.hPutStrLn handle "---"
100− U.hPutStrLn handle $ getBody page
98+ hPutStrLn handle "---"
99+ hPutStrLn handle $ getBody page
101100 hClose handle
102101
103− writePair h (k, v) = do U.hPutStr h $ k ++ ": " ++ v
104− U.hPutStrLn h ""
102+ writePair h (k, v) = do hPutStr h $ k ++ ": " ++ v
103+ hPutStrLn h ""
105104
106− writeSection h (k, v) = do U.hPutStrLn h $ "--- " ++ k
107− U.hPutStrLn h v
105+ writeSection h (k, v) = do hPutStrLn h $ "--- " ++ k
106+ hPutStrLn h v
108107
109108 destination = toCache $ getURL page
110109
@@ -147,7 +146,7 @@ readPage pagePath = do
147146 -- Read file.
148147 handle <- liftIO $ openFile path ReadMode
149148 sections <- fmap (splitAtDelimiters . lines )
150− (liftIO $ U.hGetContents handle)
149+ (liftIO $ hGetContents handle)
151150
152151 let context = concat $ zipWith ($) sectionFunctions sections
153152 page = fromContext $ M.fromList $