aboutsummaryrefslogtreecommitdiff
path: root/Text
diff options
context:
space:
mode:
Diffstat (limited to 'Text')
-rw-r--r--Text/Pandoc/Highlighting.hs2
-rw-r--r--Text/Pandoc/ODT.hs2
-rw-r--r--Text/Pandoc/Shared.hs9
-rw-r--r--Text/Pandoc/TH.hs7
4 files changed, 17 insertions, 3 deletions
diff --git a/Text/Pandoc/Highlighting.hs b/Text/Pandoc/Highlighting.hs
index f9d69f2c2..6726f1a42 100644
--- a/Text/Pandoc/Highlighting.hs
+++ b/Text/Pandoc/Highlighting.hs
@@ -32,7 +32,7 @@ Exports functions for syntax highlighting.
module Text.Pandoc.Highlighting ( languages, highlightHtml, defaultHighlightingCss ) where
import Text.XHtml
import Text.Pandoc.Definition
-#ifdef HIGHLIGHTING
+#ifdef _HIGHLIGHTING
import Text.Highlighting.Kate ( languages, highlightAs, formatAsXHtml, FormatOption (..), defaultHighlightingCss )
import Data.List (find, lookup)
import Data.Maybe (fromMaybe)
diff --git a/Text/Pandoc/ODT.hs b/Text/Pandoc/ODT.hs
index b44cb303f..b0bfc6693 100644
--- a/Text/Pandoc/ODT.hs
+++ b/Text/Pandoc/ODT.hs
@@ -43,7 +43,7 @@ import Network.URI ( isURI )
import qualified Data.ByteString as B ( writeFile, pack )
import Data.ByteString.Internal ( c2w )
import Prelude hiding ( writeFile, readFile )
-#ifdef UTF_8
+#ifdef _UTF8
import System.IO.UTF8
import System.IO ( stderr )
#else
diff --git a/Text/Pandoc/Shared.hs b/Text/Pandoc/Shared.hs
index eb924239d..6ae507cfa 100644
--- a/Text/Pandoc/Shared.hs
+++ b/Text/Pandoc/Shared.hs
@@ -1,3 +1,4 @@
+{-# LANGUAGE CPP #-}
{-
Copyright (C) 2006-8 John MacFarlane <jgm@berkeley.edu>
@@ -115,6 +116,12 @@ import Network.URI ( parseURI, URI (..), isAllowedInURI )
import System.FilePath ( (</>), (<.>) )
import System.IO.Error ( catch, ioError, isAlreadyExistsError )
import System.Directory
+import Prelude hiding ( putStrLn )
+#ifdef _UTF8
+import System.IO.UTF8
+#else
+import System.IO
+#endif
--
-- List processing
@@ -612,7 +619,7 @@ readWith parser state input =
testStringWith :: (Show a) => GenParser Char ParserState a
-> String
-> IO ()
-testStringWith parser str = putStrLn $ show $
+testStringWith parser str = putStrLn $ show $
readWith parser defaultParserState str
-- | Parsing options.
diff --git a/Text/Pandoc/TH.hs b/Text/Pandoc/TH.hs
index 5e486b039..30f5c86e4 100644
--- a/Text/Pandoc/TH.hs
+++ b/Text/Pandoc/TH.hs
@@ -1,3 +1,4 @@
+{-# LANGUAGE CPP #-}
{-# OPTIONS_GHC -fno-warn-orphans #-}
{-
Copyright (C) 2008 John MacFarlane <jgm@berkeley.edu>
@@ -37,6 +38,12 @@ import Language.Haskell.TH
import Language.Haskell.TH.Syntax (Lift (..))
import qualified Data.ByteString as B
import Data.ByteString.Internal ( w2c )
+import Prelude hiding ( readFile )
+#ifdef _UTF8
+import System.IO.UTF8
+#else
+import System.IO
+#endif
-- | Insert contents of text file into a template.
contentsOf :: FilePath -> ExpQ