From 03d4e6b9ef87d4e6ed018c93b358f8557f8f7388 Mon Sep 17 00:00:00 2001 From: John MacFarlane Date: Sat, 28 Sep 2019 14:45:38 -0700 Subject: More throwError in place of fail. --- src/Text/Pandoc/Writers/Docx.hs | 1 + src/Text/Pandoc/Writers/Muse.hs | 3 ++- 2 files changed, 3 insertions(+), 1 deletion(-) (limited to 'src') diff --git a/src/Text/Pandoc/Writers/Docx.hs b/src/Text/Pandoc/Writers/Docx.hs index 30c604058..73ed095c1 100644 --- a/src/Text/Pandoc/Writers/Docx.hs +++ b/src/Text/Pandoc/Writers/Docx.hs @@ -95,6 +95,7 @@ instance Semigroup EnvProps where instance Monoid EnvProps where mempty = EnvProps Nothing [] + mappend = (<>) squashProps :: EnvProps -> [Element] squashProps (EnvProps Nothing es) = es diff --git a/src/Text/Pandoc/Writers/Muse.hs b/src/Text/Pandoc/Writers/Muse.hs index 43f7f3b14..51a9ea7d6 100644 --- a/src/Text/Pandoc/Writers/Muse.hs +++ b/src/Text/Pandoc/Writers/Muse.hs @@ -629,7 +629,8 @@ inlineToMuse (Code _ str) = do then "" <> text (substitute "" "</code>" str) <> "" else "=" <> text str <> "=" inlineToMuse Math{} = - Prelude.fail "Math should be expanded before normalization" + throwError $ PandocShouldNeverHappenError + "Math should be expanded before normalization" inlineToMuse (RawInline (Format f) str) = do modify $ \st -> st { stUseTags = False } return $ " text f <> "\">" <> text str <> "" -- cgit v1.2.3