From cb8739f5b079ad5d73be6601eb7dd62c61c533a1 Mon Sep 17 00:00:00 2001 From: Albert Krewinkel Date: Thu, 8 Jan 2026 17:29:39 +0100 Subject: Lua: switch to HsLua 2.5 --- pandoc-lua-engine/src/Text/Pandoc/Lua/Module/Path.hs | 12 ++++-------- 1 file changed, 4 insertions(+), 8 deletions(-) (limited to 'pandoc-lua-engine/src/Text/Pandoc/Lua/Module/Path.hs') 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 -- cgit v1.2.3