summaryrefslogtreecommitdiff
path: root/src/pandoc.hs
diff options
context:
space:
mode:
authorJohn MacFarlane <jgm@berkeley.edu>2012-09-25 19:54:21 -0700
committerJohn MacFarlane <jgm@berkeley.edu>2012-09-25 19:54:21 -0700
commit6ad7ac1239cb384bf830b1692991030735f43e89 (patch)
treeb3f3a9399aaecb9acd7e1fa6eccc2a26bdf49191 /src/pandoc.hs
parent833977416ff8cbdcf0ebd8a6a135d7ef13fdbd73 (diff)
Removed need for utf8-string package.
* Depend on text. * Expose Text.Pandoc.UTF8. * Text.Pandoc.UTF8 now exports toString, fromString, toStringLazy, fromStringLazy. * These are used instead of the old utf8-string functions.
Diffstat (limited to 'src/pandoc.hs')
-rw-r--r--src/pandoc.hs5
1 files changed, 2 insertions, 3 deletions
diff --git a/src/pandoc.hs b/src/pandoc.hs
index 305557f6a..484f7ca44 100644
--- a/src/pandoc.hs
+++ b/src/pandoc.hs
@@ -57,7 +57,6 @@ import Control.Monad (when, unless, liftM)
import Network.HTTP (simpleHTTP, mkRequest, getResponseBody, RequestMethod(..))
import Network.URI (parseURI, isURI, URI(..))
import qualified Data.ByteString.Lazy as B
-import Data.ByteString.Lazy.UTF8 (toString)
import Text.CSL.Reference (Reference(..))
copyrightMessage :: String
@@ -988,7 +987,7 @@ main = do
readURI u
_ -> UTF8.readFile src
readURI uri = simpleHTTP (mkRequest GET uri) >>= getResponseBody >>=
- return . toString -- treat all as UTF8
+ return . UTF8.toStringLazy -- treat all as UTF8
let convertTabs = tabFilter (if preserveTabs then 0 else tabStop)
@@ -1038,7 +1037,7 @@ main = do
res <- tex2pdf latexEngine $ f writerOptions doc2
case res of
Right pdf -> writeBinary pdf
- Left err' -> err 43 $ toString err'
+ Left err' -> err 43 $ UTF8.toStringLazy err'
| otherwise -> selfcontain (f writerOptions doc2 ++
['\n' | not standalone'])
>>= writerFn outputFile . handleEntities