summaryrefslogtreecommitdiff
path: root/src/Text/Pandoc/Class.hs
diff options
context:
space:
mode:
authorJohn MacFarlane <jgm@berkeley.edu>2017-09-30 17:15:55 -0500
committerJohn MacFarlane <jgm@berkeley.edu>2017-09-30 17:15:55 -0500
commit9ec458f39f9d79e9523330e6536f5f92aa91ec43 (patch)
tree846c630f34bb77613feec18ed3be2793c791790a /src/Text/Pandoc/Class.hs
parentf3a80034fff41a8b0c13519fa13bed794db1b8d2 (diff)
Text.Pandoc.Class - add getVerbosity.
Diffstat (limited to 'src/Text/Pandoc/Class.hs')
-rw-r--r--src/Text/Pandoc/Class.hs5
1 files changed, 5 insertions, 0 deletions
diff --git a/src/Text/Pandoc/Class.hs b/src/Text/Pandoc/Class.hs
index cc24c1c30..2b1943140 100644
--- a/src/Text/Pandoc/Class.hs
+++ b/src/Text/Pandoc/Class.hs
@@ -59,6 +59,7 @@ module Text.Pandoc.Class ( PandocMonad(..)
, setTrace
, getLog
, setVerbosity
+ , getVerbosity
, getMediaBag
, setMediaBag
, insertMedia
@@ -217,6 +218,10 @@ setVerbosity :: PandocMonad m => Verbosity -> m ()
setVerbosity verbosity =
modifyCommonState $ \st -> st{ stVerbosity = verbosity }
+-- | Get the verbosity level.
+getVerbosity :: PandocMonad m => m Verbosity
+getVerbosity = getsCommonState stVerbosity
+
-- Get the accomulated log messages (in temporal order).
getLog :: PandocMonad m => m [LogMessage]
getLog = reverse <$> getsCommonState stLog