aboutsummaryrefslogtreecommitdiff
path: root/src/Text/Pandoc/Class/CommonState.hs
diff options
context:
space:
mode:
Diffstat (limited to 'src/Text/Pandoc/Class/CommonState.hs')
-rw-r--r--src/Text/Pandoc/Class/CommonState.hs5
1 files changed, 5 insertions, 0 deletions
diff --git a/src/Text/Pandoc/Class/CommonState.hs b/src/Text/Pandoc/Class/CommonState.hs
index 4e04b5add..e3c4efce9 100644
--- a/src/Text/Pandoc/Class/CommonState.hs
+++ b/src/Text/Pandoc/Class/CommonState.hs
@@ -23,6 +23,7 @@ import Text.Collate.Lang (Lang)
import Text.Pandoc.MediaBag (MediaBag)
import Text.Pandoc.Logging (LogMessage, Verbosity (WARNING))
import Text.Pandoc.Translations.Types (Translations)
+import Network.HTTP.Client (Manager)
-- | 'CommonState' represents state that is used by all
-- instances of 'PandocMonad'. Normally users should not
@@ -50,6 +51,9 @@ data CommonState = CommonState
, stResourcePath :: [FilePath]
-- ^ Path to search for resources like
-- included images
+ , stManager :: Maybe Manager
+ -- ^ Manager for HTTP client; this needs to persist across many requests
+ -- for efficiency.
, stVerbosity :: Verbosity
-- ^ Verbosity level
, stTrace :: Bool
@@ -75,6 +79,7 @@ defaultCommonState = CommonState
, stInputFiles = []
, stOutputFile = Nothing
, stResourcePath = ["."]
+ , stManager = Nothing
, stVerbosity = WARNING
, stTrace = False
}