From afbf732a830074cb01804d9808cc8334a1572c8e Mon Sep 17 00:00:00 2001 From: Albert Krewinkel Date: Thu, 6 Oct 2022 12:57:46 +0200 Subject: Lua: cleanup module dependencies Ensures a cleaner module dependency graph. --- pandoc-lua-engine/src/Text/Pandoc/Lua/Module/Format.hs | 2 +- pandoc-lua-engine/src/Text/Pandoc/Lua/Module/Types.hs | 2 +- pandoc-lua-engine/src/Text/Pandoc/Lua/Module/Utils.hs | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) (limited to 'pandoc-lua-engine/src/Text/Pandoc/Lua/Module') diff --git a/pandoc-lua-engine/src/Text/Pandoc/Lua/Module/Format.hs b/pandoc-lua-engine/src/Text/Pandoc/Lua/Module/Format.hs index 8fa0485fc..7eb66b3ca 100644 --- a/pandoc-lua-engine/src/Text/Pandoc/Lua/Module/Format.hs +++ b/pandoc-lua-engine/src/Text/Pandoc/Lua/Module/Format.hs @@ -15,8 +15,8 @@ import HsLua import Text.Pandoc.Error (PandocError) import Text.Pandoc.Extensions ( getAllExtensions, getDefaultExtensions ) -import Text.Pandoc.Lua.ErrorConversion () import Text.Pandoc.Lua.Marshal.Extensions (pushExtensions) +import Text.Pandoc.Lua.PandocLua () import qualified Data.Text as T diff --git a/pandoc-lua-engine/src/Text/Pandoc/Lua/Module/Types.hs b/pandoc-lua-engine/src/Text/Pandoc/Lua/Module/Types.hs index b8d45d93e..7d9ad6784 100644 --- a/pandoc-lua-engine/src/Text/Pandoc/Lua/Module/Types.hs +++ b/pandoc-lua-engine/src/Text/Pandoc/Lua/Module/Types.hs @@ -17,7 +17,7 @@ import HsLua ( Module (..), (###), (<#>), (=#>) , defun, functionResult, parameter) import HsLua.Module.Version (peekVersionFuzzy, pushVersion) import Text.Pandoc.Error (PandocError) -import Text.Pandoc.Lua.ErrorConversion () +import Text.Pandoc.Lua.PandocLua () -- | Push the pandoc.types module on the Lua stack. documentedModule :: Module PandocError diff --git a/pandoc-lua-engine/src/Text/Pandoc/Lua/Module/Utils.hs b/pandoc-lua-engine/src/Text/Pandoc/Lua/Module/Utils.hs index 33349870c..16305b76e 100644 --- a/pandoc-lua-engine/src/Text/Pandoc/Lua/Module/Utils.hs +++ b/pandoc-lua-engine/src/Text/Pandoc/Lua/Module/Utils.hs @@ -204,7 +204,7 @@ stringify idx = forcePeek . retrieving "stringifyable element" $ -- | Converts an old/simple table into a normal table block element. from_simple_table :: SimpleTable -> LuaE PandocError NumResults from_simple_table (SimpleTable capt aligns widths head' body) = do - Lua.push $ Table + pushBlock $ Table nullAttr (Caption Nothing [Plain capt | not (null capt)]) (zipWith (\a w -> (a, toColWidth w)) aligns widths) -- cgit v1.2.3