From 7b986acd72157ef2b3a4747f197604d55558e31f Mon Sep 17 00:00:00 2001 From: fiddlosopher Date: Fri, 1 Aug 2008 15:17:48 +0000 Subject: [PATCH] Don't use OverloadedStrings in ODT writer. Remove version dependency from bytestring. git-svn-id: https://pandoc.googlecode.com/svn/trunk@1359 788f1e2b-df1e-0410-8736-df70ead52e1b --- Text/Pandoc/ODT.hs | 10 +++------- pandoc.cabal | 3 +-- 2 files changed, 4 insertions(+), 9 deletions(-) diff --git a/Text/Pandoc/ODT.hs b/Text/Pandoc/ODT.hs index 16e8f0c26..c83ccca65 100644 --- a/Text/Pandoc/ODT.hs +++ b/Text/Pandoc/ODT.hs @@ -1,4 +1,4 @@ -{-# LANGUAGE TemplateHaskell, OverloadedStrings #-} +{-# LANGUAGE TemplateHaskell #-} {- Copyright (C) 2008 John MacFarlane @@ -43,11 +43,7 @@ import Text.XML.Light import Text.XML.Light.Cursor import Text.Pandoc.Shared ( withTempDir ) import Network.URI ( isURI ) -import Data.String ( IsString (..) ) -import qualified Data.ByteString.Char8 as B ( writeFile, pack, ByteString ) - -instance IsString B.ByteString - where fromString = B.pack +import qualified Data.ByteString.Char8 as B ( writeFile, pack ) -- | Produce an ODT file from OpenDocument XML. saveOpenDocumentAsODT :: FilePath -- ^ Pathname of ODT file to be produced. @@ -68,7 +64,7 @@ saveOpenDocumentAsODT destinationODTPath sourceDirRelative xml = do withTempDir "pandoc-odt" $ \tempDir -> do let tempODT = tempDir "reference.odt" copyFile "odt-styles/reference.odt" tempODT - B.writeFile tempODT $(contentsOf "odt-styles/reference.odt") + B.writeFile tempODT $ B.pack $(contentsOf "odt-styles/reference.odt") createDirectory $ tempDir "Pictures" xml' <- handlePictures tempODT sourceDirRelative xml writeFile (tempDir "content.xml") xml' diff --git a/pandoc.cabal b/pandoc.cabal index 2f3fc39ef..329a373b5 100644 --- a/pandoc.cabal +++ b/pandoc.cabal @@ -74,8 +74,7 @@ Library Build-depends: highlighting-kate cpp-options: -DHIGHLIGHTING Build-Depends: parsec < 3, xhtml, mtl, network, filepath, process, directory, utf8-string, - template-haskell, bytestring == 0.9.0.1 - -- Note: bytestring-0.9.1.0 contains an InString instance for ByteString + template-haskell, bytestring Hs-Source-Dirs: . Exposed-Modules: Text.Pandoc, Text.Pandoc.Blocks,