diff options
author | John MacFarlane <jgm@berkeley.edu> | 2014-05-19 09:45:00 -0700 |
---|---|---|
committer | John MacFarlane <jgm@berkeley.edu> | 2014-05-19 09:45:00 -0700 |
commit | 8d04c821aaa8a96803126140b58b8aef02d85906 (patch) | |
tree | d3c56d3f4f2d6aad7095b74747524a36f3fe5c1c | |
parent | 0dd31b68a51751fa13e9e008b27dc18230c54cbb (diff) | |
download | pandoc-8d04c821aaa8a96803126140b58b8aef02d85906.tar.gz |
Avoid `import Prelude hiding (catch)`.
See #1309.
-rw-r--r-- | src/Text/Pandoc/UTF8.hs | 3 | ||||
-rw-r--r-- | src/Text/Pandoc/Writers/EPUB.hs | 10 |
2 files changed, 4 insertions, 9 deletions
diff --git a/src/Text/Pandoc/UTF8.hs b/src/Text/Pandoc/UTF8.hs index 33c9ec1c5..cf25de85b 100644 --- a/src/Text/Pandoc/UTF8.hs +++ b/src/Text/Pandoc/UTF8.hs @@ -51,8 +51,7 @@ import System.IO hiding (readFile, writeFile, getContents, #if MIN_VERSION_base(4,6,0) import Prelude hiding (readFile, writeFile, getContents, putStr, putStrLn) #else -import Prelude hiding (readFile, writeFile, getContents, putStr, putStrLn, - catch) +import Prelude hiding (readFile, writeFile, getContents, putStr, putStrLn) #endif import qualified System.IO as IO import qualified Data.ByteString.Char8 as B diff --git a/src/Text/Pandoc/Writers/EPUB.hs b/src/Text/Pandoc/Writers/EPUB.hs index 4d2a39846..9514e87c9 100644 --- a/src/Text/Pandoc/Writers/EPUB.hs +++ b/src/Text/Pandoc/Writers/EPUB.hs @@ -59,11 +59,7 @@ import Text.Pandoc.Writers.Markdown ( writePlain ) import Data.Char ( toLower, isDigit, isAlphaNum ) import Network.URI ( unEscapeString ) import Text.Pandoc.MIME (getMimeType) -#if MIN_VERSION_base(4,6,0) -#else -import Prelude hiding (catch) -#endif -import Control.Exception (catch, SomeException) +import qualified Control.Exception as E import Text.Blaze.Html.Renderer.Utf8 (renderHtml) import Text.HTML.TagSoup @@ -153,10 +149,10 @@ getEPUBMetadata opts meta = do then case lookup "lang" (writerVariables opts) of Just x -> return m{ epubLanguage = x } Nothing -> do - localeLang <- catch (liftM + localeLang <- E.catch (liftM (map (\c -> if c == '_' then '-' else c) . takeWhile (/='.')) $ getEnv "LANG") - (\e -> let _ = (e :: SomeException) in return "en-US") + (\e -> let _ = (e :: E.SomeException) in return "en-US") return m{ epubLanguage = localeLang } else return m let fixDate m = |