git.iko.soy/typeable/pandoc
on master help sign in
Avoid `import Prelude hiding (catch)`.

See #1309.

commit8d04c821aaa8a96803126140b58b8aef02d85906 authorJohn MacFarlane <jgm@berkeley.edu> dateMon 19 May 2014, 09:45 (12 years ago) parent0dd31b6
2 files changed+4−9
src/Text/Pandoc/UTF8.hs+1−2 src/Text/Pandoc/Writers/EPUB.hs+3−7
src/Text/Pandoc/UTF8.hs+1−2
@@ -51,8 +51,7 @@ import System.IO hiding (readFile, writeFile, getContents,
5151#if MIN_VERSION_base(4,6,0)
5252import Prelude hiding (readFile, writeFile, getContents, putStr, putStrLn)
5353#else
54−import Prelude hiding (readFile, writeFile, getContents, putStr, putStrLn,
55− catch)
54+import Prelude hiding (readFile, writeFile, getContents, putStr, putStrLn)
5655#endif
5756import qualified System.IO as IO
5857import qualified Data.ByteString.Char8 as B
src/Text/Pandoc/Writers/EPUB.hs+3−7
@@ -59,11 +59,7 @@ import Text.Pandoc.Writers.Markdown ( writePlain )
5959import Data.Char ( toLower, isDigit, isAlphaNum )
6060import Network.URI ( unEscapeString )
6161import Text.Pandoc.MIME (getMimeType)
62−#if MIN_VERSION_base(4,6,0)
63−#else
64−import Prelude hiding (catch)
65−#endif
66−import Control.Exception (catch, SomeException)
62+import qualified Control.Exception as E
6763import Text.Blaze.Html.Renderer.Utf8 (renderHtml)
6864import Text.HTML.TagSoup
6965
@@ -153,10 +149,10 @@ getEPUBMetadata opts meta = do
153149 then case lookup "lang" (writerVariables opts) of
154150 Just x -> return m{ epubLanguage = x }
155151 Nothing -> do
156− localeLang <- catch (liftM
152+ localeLang <- E.catch (liftM
157153 (map (\c -> if c == '_' then '-' else c) .
158154 takeWhile (/='.')) $ getEnv "LANG")
159− (\e -> let _ = (e :: SomeException) in return "en-US")
155+ (\e -> let _ = (e :: E.SomeException) in return "en-US")
160156 return m{ epubLanguage = localeLang }
161157 else return m
162158 let fixDate m =