Text.Pandoc.Lua.Marshal.List

pandoc-lua-marshal-0.1.4: Use pandoc types in Lua

Copyright | © 2021 Albert Krewinkel
License | MIT
Maintainer | Albert Krewinkel <tarleb+pandoc@moltkeplatz.de>
Safe Haskell | Safe-Inferred
Language | Haskell2010

Text.Pandoc.Lua.Marshal.List

Description

Marshaling/unmarshaling functions and constructor for `ListAttributes` values.

Synopsis

- pushPandocList :: LuaError e => Pusher e a -> Pusher e [a]
- luaopen_list_ptr :: CFunction
- pushListModule :: LuaError e => LuaE e ()
- newListMetatable :: Name -> LuaE e () -> LuaE e ()

# Documentation

pushPandocList :: LuaError e => Pusher e a -> Pusher e [a] #

Pushes a list as a numerically-indexed Lua table, and sets a metatable that offers a number of convenience functions.

luaopen_list_ptr :: CFunction #

Pointer to the function that opens the List module and pushes it to the stack.

pushListModule :: LuaError e => LuaE e () #

Opens the List module and pushes it to the stack.

newListMetatable #

Arguments

:: Name |
-> LuaE e () | setup
-> LuaE e () |

Pushes the metatable of the given List type, creating it if necessary. The `setup` operation is run when the metatable did not exists, was created, and is then at the top of the stack. The operation may modify the table but must be balanced, and must leave the stack as it found it.