From 76c55466d3087224eccdc47c804ab2904be50df5 Mon Sep 17 00:00:00 2001 From: John MacFarlane Date: Fri, 10 Feb 2017 23:59:47 +0100 Subject: Use new warnings throughout the code base. --- src/Text/Pandoc/App.hs | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) (limited to 'src/Text/Pandoc/App.hs') diff --git a/src/Text/Pandoc/App.hs b/src/Text/Pandoc/App.hs index e99767f0b..91d0711c1 100644 --- a/src/Text/Pandoc/App.hs +++ b/src/Text/Pandoc/App.hs @@ -348,8 +348,7 @@ convertWithOpts opts = do x <- f rs <- getLog return (x, rs) - let isWarning (WARNING, _) = True - isWarning _ = False + let isWarning msg = messageVerbosity msg == WARNING when (optFailIfWarnings opts && any isWarning reports) $ err 3 "Failing because there were warnings." return res -- cgit v1.2.3