diff options
| author | John MacFarlane <fiddlosopher@gmail.com> | 2012-07-24 19:28:51 -0700 |
|---|---|---|
| committer | John MacFarlane <fiddlosopher@gmail.com> | 2012-07-24 19:38:16 -0700 |
| commit | 308436996e7311caa257000f4c010686c08a58e7 (patch) | |
| tree | 10c2d8a88be4dd739fda8975ac79967daba1878c /src/Text/Pandoc/Readers | |
| parent | e6c76525b23856fd9f3e17220eba671fc9fc7d74 (diff) | |
| download | pandoc-308436996e7311caa257000f4c010686c08a58e7.tar.gz | |
Use catch from Control.Exception to avoid warnings.
Diffstat (limited to 'src/Text/Pandoc/Readers')
| -rw-r--r-- | src/Text/Pandoc/Readers/LaTeX.hs | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/src/Text/Pandoc/Readers/LaTeX.hs b/src/Text/Pandoc/Readers/LaTeX.hs index 351e1fef5..88c11593b 100644 --- a/src/Text/Pandoc/Readers/LaTeX.hs +++ b/src/Text/Pandoc/Readers/LaTeX.hs @@ -46,6 +46,7 @@ import Data.Monoid import System.FilePath (replaceExtension) import Data.List (intercalate) import qualified Data.Map as M +import qualified Control.Exception as E -- | Parse LaTeX from string and return 'Pandoc' document. readLaTeX :: ParserState -- ^ Parser state, including options for parser @@ -670,8 +671,9 @@ handleIncludes :: String -> IO String handleIncludes [] = return [] handleIncludes ('\\':xs) = case runParser include defaultParserState "input" ('\\':xs) of - Right (fs, rest) -> do let getfile f = catch (UTF8.readFile f) - (\_ -> return "") + Right (fs, rest) -> do let getfile f = E.catch (UTF8.readFile f) + (\e -> let _ = (e :: E.SomeException) + in return "") yss <- mapM getfile fs (intercalate "\n" yss ++) `fmap` handleIncludes rest |
