aboutsummaryrefslogtreecommitdiff
path: root/pandoc-lua-engine/src/Text/Pandoc/Lua/Module/Path.hs
diff options
context:
space:
mode:
authorAlbert Krewinkel <[email protected]>2026-01-08 17:29:39 +0100
committerAlbert Krewinkel <[email protected]>2026-01-08 17:55:04 +0100
commitcb8739f5b079ad5d73be6601eb7dd62c61c533a1 (patch)
tree27b6c4ffba933c8f83ebd97cbde712276e3f020c /pandoc-lua-engine/src/Text/Pandoc/Lua/Module/Path.hs
parent8123be654d6ece208df32afc26b4fe1629e78ffd (diff)
Lua: switch to HsLua 2.5
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