From f2b337768e95c8903f65e597f7d8cd81938dacc3 Mon Sep 17 00:00:00 2001
From: Albert Krewinkel <albert@zeitkraut.de>
Date: Sun, 22 Mar 2020 20:28:45 +0100
Subject: Finer grained imports of Text.Pandoc.Class submodules (#6203)

This should speed-up recompilation after changes in `Text.Pandoc.Class`,
as the number of modules affected by a change will be smaller in
general. It also offers faster insights into the parts of `T.P.Class`
used within a module.
---
 src/Text/Pandoc/Lua/Global.hs          | 2 +-
 src/Text/Pandoc/Lua/Init.hs            | 5 +++--
 src/Text/Pandoc/Lua/Module/MediaBag.hs | 5 +++--
 src/Text/Pandoc/Lua/Module/Pandoc.hs   | 2 +-
 src/Text/Pandoc/Lua/Module/Utils.hs    | 3 ++-
 src/Text/Pandoc/Lua/Packages.hs        | 3 ++-
 src/Text/Pandoc/Lua/Util.hs            | 3 ++-
 7 files changed, 14 insertions(+), 9 deletions(-)

(limited to 'src/Text/Pandoc/Lua')

diff --git a/src/Text/Pandoc/Lua/Global.hs b/src/Text/Pandoc/Lua/Global.hs
index 947c42cab..4285be662 100644
--- a/src/Text/Pandoc/Lua/Global.hs
+++ b/src/Text/Pandoc/Lua/Global.hs
@@ -19,7 +19,7 @@ import Foreign.Lua (Lua, Peekable, Pushable)
 import Foreign.Lua.Userdata ( ensureUserdataMetatable, pushAnyWithMetatable
                             , metatableName)
 import Paths_pandoc (version)
-import Text.Pandoc.Class (CommonState)
+import Text.Pandoc.Class.CommonState (CommonState)
 import Text.Pandoc.Definition (Pandoc (Pandoc), pandocTypesVersion)
 import Text.Pandoc.Lua.Marshaling ()
 import Text.Pandoc.Lua.Util (addFunction)
diff --git a/src/Text/Pandoc/Lua/Init.hs b/src/Text/Pandoc/Lua/Init.hs
index 8abe81125..757d32898 100644
--- a/src/Text/Pandoc/Lua/Init.hs
+++ b/src/Text/Pandoc/Lua/Init.hs
@@ -19,8 +19,9 @@ import Control.Monad.Trans (MonadIO (..))
 import Data.Data (Data, dataTypeConstrs, dataTypeOf, showConstr)
 import Foreign.Lua (Lua)
 import GHC.IO.Encoding (getForeignEncoding, setForeignEncoding, utf8)
-import Text.Pandoc.Class (PandocIO, getCommonState, getUserDataDir,
-                          putCommonState)
+import Text.Pandoc.Class.PandocIO (PandocIO)
+import Text.Pandoc.Class.PandocMonad (getCommonState, getUserDataDir,
+                                      putCommonState)
 import Text.Pandoc.Lua.Global (Global (..), setGlobals)
 import Text.Pandoc.Lua.Packages (LuaPackageParams (..),
                                  installPandocPackageSearcher)
diff --git a/src/Text/Pandoc/Lua/Module/MediaBag.hs b/src/Text/Pandoc/Lua/Module/MediaBag.hs
index 23f335caa..769f7e110 100644
--- a/src/Text/Pandoc/Lua/Module/MediaBag.hs
+++ b/src/Text/Pandoc/Lua/Module/MediaBag.hs
@@ -15,8 +15,9 @@ module Text.Pandoc.Lua.Module.MediaBag
 
 import Control.Monad (zipWithM_)
 import Foreign.Lua (Lua, NumResults, Optional, liftIO)
-import Text.Pandoc.Class (CommonState (..), fetchItem, putCommonState,
-                          runIOorExplode, setMediaBag)
+import Text.Pandoc.Class.CommonState (CommonState (..))
+import Text.Pandoc.Class.PandocIO (runIOorExplode)
+import Text.Pandoc.Class.PandocMonad (fetchItem, putCommonState, setMediaBag)
 import Text.Pandoc.Lua.Marshaling ()
 import Text.Pandoc.Lua.Marshaling.MediaBag (pushIterator)
 import Text.Pandoc.Lua.Util (addFunction)
diff --git a/src/Text/Pandoc/Lua/Module/Pandoc.hs b/src/Text/Pandoc/Lua/Module/Pandoc.hs
index cc9f210a8..f376d0044 100644
--- a/src/Text/Pandoc/Lua/Module/Pandoc.hs
+++ b/src/Text/Pandoc/Lua/Module/Pandoc.hs
@@ -20,7 +20,7 @@ import Data.Default (Default (..))
 import Data.Maybe (fromMaybe)
 import Foreign.Lua (Lua, NumResults, Optional, Peekable, Pushable)
 import System.Exit (ExitCode (..))
-import Text.Pandoc.Class (runIO)
+import Text.Pandoc.Class.PandocIO (runIO)
 import Text.Pandoc.Definition (Block, Inline)
 import Text.Pandoc.Lua.Filter (walkInlines, walkBlocks, LuaFilter, SingletonsList (..))
 import Text.Pandoc.Lua.Marshaling ()
diff --git a/src/Text/Pandoc/Lua/Module/Utils.hs b/src/Text/Pandoc/Lua/Module/Utils.hs
index 345a5bee4..11a0bda84 100644
--- a/src/Text/Pandoc/Lua/Module/Utils.hs
+++ b/src/Text/Pandoc/Lua/Module/Utils.hs
@@ -16,7 +16,8 @@ import Control.Applicative ((<|>))
 import Data.Default (def)
 import Data.Version (Version)
 import Foreign.Lua (Peekable, Lua, NumResults)
-import Text.Pandoc.Class (runIO, setUserDataDir)
+import Text.Pandoc.Class.PandocIO (runIO)
+import Text.Pandoc.Class.PandocMonad (setUserDataDir)
 import Text.Pandoc.Definition ( Pandoc, Meta, MetaValue (..), Block, Inline
                               , Citation, Attr, ListAttributes)
 import Text.Pandoc.Lua.Marshaling ()
diff --git a/src/Text/Pandoc/Lua/Packages.hs b/src/Text/Pandoc/Lua/Packages.hs
index 4a0401cfa..ad338f4bd 100644
--- a/src/Text/Pandoc/Lua/Packages.hs
+++ b/src/Text/Pandoc/Lua/Packages.hs
@@ -18,7 +18,8 @@ module Text.Pandoc.Lua.Packages
 import Control.Monad (forM_)
 import Data.ByteString (ByteString)
 import Foreign.Lua (Lua, NumResults, liftIO)
-import Text.Pandoc.Class (readDataFile, runIO, setUserDataDir)
+import Text.Pandoc.Class.PandocIO (runIO)
+import Text.Pandoc.Class.PandocMonad (readDataFile, setUserDataDir)
 
 import qualified Foreign.Lua as Lua
 import Text.Pandoc.Lua.Module.Pandoc as Pandoc
diff --git a/src/Text/Pandoc/Lua/Util.hs b/src/Text/Pandoc/Lua/Util.hs
index e7bb17dc9..d79fbb085 100644
--- a/src/Text/Pandoc/Lua/Util.hs
+++ b/src/Text/Pandoc/Lua/Util.hs
@@ -29,7 +29,8 @@ module Text.Pandoc.Lua.Util
 import Control.Monad (unless, when)
 import Foreign.Lua ( Lua, NumArgs, NumResults, Peekable, Pushable, StackIndex
                    , Status, ToHaskellFunction )
-import Text.Pandoc.Class (readDataFile, runIOorExplode, setUserDataDir)
+import Text.Pandoc.Class.PandocIO (runIOorExplode)
+import Text.Pandoc.Class.PandocMonad (readDataFile, setUserDataDir)
 import qualified Foreign.Lua as Lua
 import qualified Text.Pandoc.UTF8 as UTF8
 import Data.Text (Text)
-- 
cgit v1.2.3