module Text.Pandoc.Lua.Module.System
( pushModule
) where
import Prelude
import Foreign.Lua (Lua, NumResults)
import Foreign.Lua.Module.System (arch, env, getwd, os,
with_env, with_tmpdir, with_wd)
import Text.Pandoc.Lua.Util (addFunction, addField)
import qualified Foreign.Lua as Lua
pushModule :: Lua NumResults
pushModule = do
Lua.newtable
addField "arch" arch
addField "os" os
addFunction "environment" env
addFunction "get_current_directory" getwd
addFunction "with_environment" with_env
addFunction "with_temp_directory" with_tmpdir
addFunction "with_working_directory" with_wd
return 1