aboutsummaryrefslogtreecommitdiff
path: root/pandoc-lua-engine/src/Text/Pandoc/Lua/Module/Path.hs
diff options
context:
space:
mode:
Diffstat (limited to 'pandoc-lua-engine/src/Text/Pandoc/Lua/Module/Path.hs')
-rw-r--r--pandoc-lua-engine/src/Text/Pandoc/Lua/Module/Path.hs12
1 files changed, 4 insertions, 8 deletions
diff --git a/pandoc-lua-engine/src/Text/Pandoc/Lua/Module/Path.hs b/pandoc-lua-engine/src/Text/Pandoc/Lua/Module/Path.hs
index 1d2169976..efe00e03c 100644
--- a/pandoc-lua-engine/src/Text/Pandoc/Lua/Module/Path.hs
+++ b/pandoc-lua-engine/src/Text/Pandoc/Lua/Module/Path.hs
@@ -22,14 +22,13 @@ import qualified HsLua.Module.System as MSystem
-- | Push the pandoc.system module on the Lua stack.
documentedModule :: forall e. LuaError e => Module e
-documentedModule = Module
- { moduleName = "pandoc.path"
- , moduleDescription = moduleDescription @e MPath.documentedModule
- , moduleFields =
+documentedModule = defmodule "pandoc.path"
+ `withDescription` moduleDescription @e MPath.documentedModule
+ `withFields`
[ MPath.separator
, MPath.search_path_separator
]
- , moduleFunctions =
+ `withFunctions`
[ MPath.directory `since` v[2,12]
, MSystem.exists `since` v[3,7,1]
, MPath.filename `since` v[2,12]
@@ -43,8 +42,5 @@ documentedModule = Module
, MPath.split_search_path `since` v[2,12]
, MPath.treat_strings_as_paths `since` v[2,12]
]
- , moduleOperations = []
- , moduleTypeInitializers = []
- }
where
v = makeVersion