summaryrefslogtreecommitdiff
path: root/src/pandoc.hs
diff options
context:
space:
mode:
authorJohn MacFarlane <fiddlosopher@gmail.com>2012-09-23 10:43:03 -0700
committerJohn MacFarlane <fiddlosopher@gmail.com>2012-09-23 10:43:03 -0700
commit51178dda976fd358bcd091f833254542006cebcc (patch)
tree4a2ab2775ea60850c7306a16945e1c1749706c6f /src/pandoc.hs
parent22bd34fa338edc5fb38cce5adfa11ffbc451b0d4 (diff)
Export encodePath/decodePath from UTF8.
Removed duplicate code in src/pandoc.hs.
Diffstat (limited to 'src/pandoc.hs')
-rw-r--r--src/pandoc.hs16
1 files changed, 1 insertions, 15 deletions
diff --git a/src/pandoc.hs b/src/pandoc.hs
index cb561e817..9cfaaeefe 100644
--- a/src/pandoc.hs
+++ b/src/pandoc.hs
@@ -59,20 +59,6 @@ import Network.URI (parseURI, isURI, URI(..))
import qualified Data.ByteString.Lazy as B
import Data.ByteString.Lazy.UTF8 (toString)
import Text.CSL.Reference (Reference(..))
-#if MIN_VERSION_base(4,4,0)
-#else
-import Codec.Binary.UTF8.String (decodeString, encodeString)
-#endif
-
-encodePath, decodeArg :: FilePath -> FilePath
-#if MIN_VERSION_base(4,4,0)
-encodePath = id
-decodeArg = id
-#else
-encodePath = encodeString
-decodeArg = decodeString
-#endif
-
copyrightMessage :: String
copyrightMessage = "\nCopyright (C) 2006-2012 John MacFarlane\n" ++
@@ -1037,7 +1023,7 @@ main = do
else return doc1
let writeBinary :: B.ByteString -> IO ()
- writeBinary = B.writeFile (encodePath outputFile)
+ writeBinary = B.writeFile (UTF8.encodePath outputFile)
let writerFn :: FilePath -> String -> IO ()
writerFn "-" = UTF8.putStr