aboutsummaryrefslogtreecommitdiff
path: root/src/Text/Pandoc/Readers/LaTeX/Parsing.hs
diff options
context:
space:
mode:
authorJohn MacFarlane <jgm@berkeley.edu>2019-09-28 11:56:51 -0700
committerJohn MacFarlane <jgm@berkeley.edu>2019-09-28 11:56:51 -0700
commitc86691fb84ec830086bc9b5e54b1ec8e41d160c8 (patch)
treebff78fc2259df9ddad1edde9d57b0f17a3877e68 /src/Text/Pandoc/Readers/LaTeX/Parsing.hs
parent981b5de790d7625b717083cb1bcf6a88224f34dd (diff)
downloadpandoc-c86691fb84ec830086bc9b5e54b1ec8e41d160c8.tar.gz
Use Prelude.fail to avoid ambiguity with fail from GHC.Base.
Diffstat (limited to 'src/Text/Pandoc/Readers/LaTeX/Parsing.hs')
-rw-r--r--src/Text/Pandoc/Readers/LaTeX/Parsing.hs10
1 files changed, 5 insertions, 5 deletions
diff --git a/src/Text/Pandoc/Readers/LaTeX/Parsing.hs b/src/Text/Pandoc/Readers/LaTeX/Parsing.hs
index a0d604ea8..018ee2578 100644
--- a/src/Text/Pandoc/Readers/LaTeX/Parsing.hs
+++ b/src/Text/Pandoc/Readers/LaTeX/Parsing.hs
@@ -244,7 +244,7 @@ applyMacros s = (guardDisabled Ext_latex_macros >> return s) <|>
, sMacros = extractMacros pstate }
res <- runParserT retokenize lstate "math" (tokenize "math" (T.pack s))
case res of
- Left e -> fail (show e)
+ Left e -> Prelude.fail (show e)
Right s' -> return s'
tokenize :: SourceName -> Text -> [Tok]
@@ -452,7 +452,7 @@ doMacros' n inp = do
lstate <- getState
res <- lift $ runParserT getargs' lstate "args" ts
case res of
- Left _ -> fail $ "Could not parse arguments for " ++
+ Left _ -> Prelude.fail $ "Could not parse arguments for " ++
T.unpack name
Right (args, rest) -> do
-- first boolean param is true if we're tokenizing
@@ -576,11 +576,11 @@ primEscape = do
Just (c, _)
| c >= '\64' && c <= '\127' -> return (chr (ord c - 64))
| otherwise -> return (chr (ord c + 64))
- Nothing -> fail "Empty content of Esc1"
+ Nothing -> Prelude.fail "Empty content of Esc1"
Esc2 -> case safeRead ('0':'x':T.unpack (T.drop 2 t)) of
Just x -> return (chr x)
- Nothing -> fail $ "Could not read: " ++ T.unpack t
- _ -> fail "Expected an Esc1 or Esc2 token" -- should not happen
+ Nothing -> Prelude.fail $ "Could not read: " ++ T.unpack t
+ _ -> Prelude.fail "Expected an Esc1 or Esc2 token" -- should not happen
bgroup :: PandocMonad m => LP m Tok
bgroup = try $ do