diff options
| author | Albert Krewinkel <[email protected]> | 2026-01-08 17:29:39 +0100 |
|---|---|---|
| committer | Albert Krewinkel <[email protected]> | 2026-01-08 17:55:04 +0100 |
| commit | cb8739f5b079ad5d73be6601eb7dd62c61c533a1 (patch) | |
| tree | 27b6c4ffba933c8f83ebd97cbde712276e3f020c /pandoc-lua-engine/src/Text/Pandoc/Lua/Module/CLI.hs | |
| parent | 8123be654d6ece208df32afc26b4fe1629e78ffd (diff) | |
Lua: switch to HsLua 2.5
Diffstat (limited to 'pandoc-lua-engine/src/Text/Pandoc/Lua/Module/CLI.hs')
| -rw-r--r-- | pandoc-lua-engine/src/Text/Pandoc/Lua/Module/CLI.hs | 24 |
1 files changed, 9 insertions, 15 deletions
diff --git a/pandoc-lua-engine/src/Text/Pandoc/Lua/Module/CLI.hs b/pandoc-lua-engine/src/Text/Pandoc/Lua/Module/CLI.hs index 868112561..3d8ff2727 100644 --- a/pandoc-lua-engine/src/Text/Pandoc/Lua/Module/CLI.hs +++ b/pandoc-lua-engine/src/Text/Pandoc/Lua/Module/CLI.hs @@ -23,20 +23,17 @@ import qualified Data.Text as T -- | Push the pandoc.types module on the Lua stack. documentedModule :: Module PandocError -documentedModule = Module - { moduleName = "pandoc.cli" - , moduleDescription = +documentedModule = defmodule "pandoc.cli" + `withDescription` "Command line options and argument parsing." - , moduleFields = - [ Field - { fieldName = "default_options" - , fieldType = "table" - , fieldDescription = "Default CLI options, using a JSON-like " <> - "representation." - , fieldPushValue = pushViaJSON defaultOpts - } + `withFields` + [ deffield "default_options" + `withType` "table" + `withDescription` + "Default CLI options, using a JSON-like representation." + `withValue` pushViaJSON defaultOpts ] - , moduleFunctions = + `withFunctions` [ defun "parse_options" ### parseOptions <#> parameter peekArgs "{string,...}" "args" @@ -52,9 +49,6 @@ documentedModule = Module , repl `since` makeVersion [3, 1, 2] ] - , moduleOperations = [] - , moduleTypeInitializers = [] - } where peekArgs idx = (,) |
