diff options
author | John MacFarlane <jgm@berkeley.edu> | 2019-09-28 11:56:51 -0700 |
---|---|---|
committer | John MacFarlane <jgm@berkeley.edu> | 2019-09-28 11:56:51 -0700 |
commit | c86691fb84ec830086bc9b5e54b1ec8e41d160c8 (patch) | |
tree | bff78fc2259df9ddad1edde9d57b0f17a3877e68 /src/Text/Pandoc/Writers | |
parent | 981b5de790d7625b717083cb1bcf6a88224f34dd (diff) | |
download | pandoc-c86691fb84ec830086bc9b5e54b1ec8e41d160c8.tar.gz |
Use Prelude.fail to avoid ambiguity with fail from GHC.Base.
Diffstat (limited to 'src/Text/Pandoc/Writers')
-rw-r--r-- | src/Text/Pandoc/Writers/Docx.hs | 2 | ||||
-rw-r--r-- | src/Text/Pandoc/Writers/HTML.hs | 2 | ||||
-rw-r--r-- | src/Text/Pandoc/Writers/Muse.hs | 6 | ||||
-rw-r--r-- | src/Text/Pandoc/Writers/OOXML.hs | 4 | ||||
-rw-r--r-- | src/Text/Pandoc/Writers/Powerpoint/Output.hs | 2 |
5 files changed, 8 insertions, 8 deletions
diff --git a/src/Text/Pandoc/Writers/Docx.hs b/src/Text/Pandoc/Writers/Docx.hs index 4b709358f..1c5dda84c 100644 --- a/src/Text/Pandoc/Writers/Docx.hs +++ b/src/Text/Pandoc/Writers/Docx.hs @@ -580,7 +580,7 @@ writeDocx opts doc@(Pandoc meta _) = do settingsEntry <- copyChildren refArchive distArchive settingsPath epochtime settingsList let entryFromArchive arch path = - maybe (fail $ path ++ " missing in reference docx") + maybe (Prelude.fail $ path ++ " missing in reference docx") return (findEntryByPath path arch `mplus` findEntryByPath path distArchive) docPropsAppEntry <- entryFromArchive refArchive "docProps/app.xml" diff --git a/src/Text/Pandoc/Writers/HTML.hs b/src/Text/Pandoc/Writers/HTML.hs index 52825fb09..c74d677e0 100644 --- a/src/Text/Pandoc/Writers/HTML.hs +++ b/src/Text/Pandoc/Writers/HTML.hs @@ -429,7 +429,7 @@ parseMailto s = let (name', rest) = span (/='@') addr let domain = drop 1 rest return (name', domain) - _ -> fail "not a mailto: URL" + _ -> Prelude.fail "not a mailto: URL" -- | Obfuscate a "mailto:" link. obfuscateLink :: PandocMonad m diff --git a/src/Text/Pandoc/Writers/Muse.hs b/src/Text/Pandoc/Writers/Muse.hs index 8c0410a56..90b23b6dd 100644 --- a/src/Text/Pandoc/Writers/Muse.hs +++ b/src/Text/Pandoc/Writers/Muse.hs @@ -607,7 +607,7 @@ inlineToMuse (Subscript lst) = do modify $ \st -> st { stUseTags = False } return $ "<sub>" <> contents <> "</sub>" inlineToMuse SmallCaps {} = - fail "SmallCaps should be expanded before normalization" + Prelude.fail "SmallCaps should be expanded before normalization" inlineToMuse (Quoted SingleQuote lst) = do contents <- inlineListToMuse lst modify $ \st -> st { stUseTags = False } @@ -617,7 +617,7 @@ inlineToMuse (Quoted DoubleQuote lst) = do modify $ \st -> st { stUseTags = False } return $ "“" <> contents <> "”" inlineToMuse Cite {} = - fail "Citations should be expanded before normalization" + Prelude.fail "Citations should be expanded before normalization" inlineToMuse (Code _ str) = do useTags <- gets stUseTags modify $ \st -> st { stUseTags = False } @@ -625,7 +625,7 @@ inlineToMuse (Code _ str) = do then "<code>" <> text (substitute "</code>" "<</code><code>/code>" str) <> "</code>" else "=" <> text str <> "=" inlineToMuse Math{} = - fail "Math should be expanded before normalization" + Prelude.fail "Math should be expanded before normalization" inlineToMuse (RawInline (Format f) str) = do modify $ \st -> st { stUseTags = False } return $ "<literal style=\"" <> text f <> "\">" <> text str <> "</literal>" diff --git a/src/Text/Pandoc/Writers/OOXML.hs b/src/Text/Pandoc/Writers/OOXML.hs index 3c62a4f79..cd90845af 100644 --- a/src/Text/Pandoc/Writers/OOXML.hs +++ b/src/Text/Pandoc/Writers/OOXML.hs @@ -54,9 +54,9 @@ parseXml :: (PandocMonad m) => Archive -> Archive -> String -> m Element parseXml refArchive distArchive relpath = case findEntryByPath relpath refArchive `mplus` findEntryByPath relpath distArchive of - Nothing -> fail $ relpath ++ " missing in reference file" + Nothing -> Prelude.fail $ relpath ++ " missing in reference file" Just e -> case parseXMLDoc . UTF8.toStringLazy . fromEntry $ e of - Nothing -> fail $ relpath ++ " corrupt in reference file" + Nothing -> Prelude.fail $ relpath ++ " corrupt in reference file" Just d -> return d -- Copied from Util diff --git a/src/Text/Pandoc/Writers/Powerpoint/Output.hs b/src/Text/Pandoc/Writers/Powerpoint/Output.hs index 79a5ed65f..4a8dc1528 100644 --- a/src/Text/Pandoc/Writers/Powerpoint/Output.hs +++ b/src/Text/Pandoc/Writers/Powerpoint/Output.hs @@ -173,7 +173,7 @@ copyFileToArchive arch fp = do refArchive <- asks envRefArchive distArchive <- asks envDistArchive case findEntryByPath fp refArchive `mplus` findEntryByPath fp distArchive of - Nothing -> fail $ fp ++ " missing in reference file" + Nothing -> Prelude.fail $ fp ++ " missing in reference file" Just e -> return $ addEntryToArchive e arch alwaysInheritedPatterns :: [Pattern] |