From f4d9b443d8b44b802d564a64280cbe9ea89dacc8 Mon Sep 17 00:00:00 2001 From: Albert Krewinkel Date: Fri, 29 Oct 2021 17:08:03 +0200 Subject: Lua: use hslua module abstraction where possible This will make it easier to generate module documentation in the future. --- src/Text/Pandoc/Lua/Util.hs | 9 --------- 1 file changed, 9 deletions(-) (limited to 'src/Text/Pandoc/Lua/Util.hs') diff --git a/src/Text/Pandoc/Lua/Util.hs b/src/Text/Pandoc/Lua/Util.hs index f20bc09e8..f35201db0 100644 --- a/src/Text/Pandoc/Lua/Util.hs +++ b/src/Text/Pandoc/Lua/Util.hs @@ -18,7 +18,6 @@ Lua utility functions. module Text.Pandoc.Lua.Util ( getTag , addField - , addFunction , callWithTraceback , dofileWithTraceback , pushViaConstr' @@ -35,14 +34,6 @@ addField key value = do Lua.push value Lua.rawset (Lua.nth 3) --- | Add a function to the table at the top of the stack, using the --- given name. -addFunction :: Exposable e a => String -> a -> LuaE e () -addFunction name fn = do - Lua.push name - Lua.pushHaskellFunction $ toHaskellFunction fn - Lua.rawset (-3) - -- | Get the tag of a value. This is an optimized and specialized version of -- @Lua.getfield idx "tag"@. It only checks for the field on the table at index -- @idx@ and on its metatable, also ignoring any @__index@ value on the -- cgit v1.2.3