-- Hoogle documentation, generated by Haddock
-- See Hoogle, http://www.haskell.org/hoogle/

-- | Lua engine to power custom pandoc conversions
--   
--   This package provides a pandoc scripting engine based on Lua.
@package pandoc-lua-engine
@version 0.5.3

-- | Running pandoc Lua filters.
module Text.Pandoc.Lua

-- | Run the Lua filter in filterPath for a transformation to the
--   target format (first element in args). Pandoc uses Lua init files to
--   setup the Lua interpreter.
applyFilter :: (PandocMonad m, MonadIO m) => Environment -> [String] -> FilePath -> Pandoc -> m Pandoc

-- | Convert custom markup to Pandoc.
loadCustom :: (PandocMonad m, MonadIO m) => FilePath -> m (CustomComponents m)

-- | Permissible global Lua variables.
data Global
FORMAT :: Text -> Global
PANDOC_API_VERSION :: Global
PANDOC_DOCUMENT :: Pandoc -> Global
PANDOC_READER_OPTIONS :: ReaderOptions -> Global
PANDOC_WRITER_OPTIONS :: WriterOptions -> Global
PANDOC_SCRIPT_FILE :: FilePath -> Global
PANDOC_STATE :: Global
PANDOC_VERSION :: Global

-- | Set all given globals.
setGlobals :: [Global] -> LuaE PandocError ()

-- | Run the Lua interpreter, using pandoc's default way of environment
--   initialization.
runLua :: (PandocMonad m, MonadIO m) => LuaE PandocError a -> m (Either PandocError a)

-- | Like runLua, but ignores all environment variables like
--   LUA_PATH.
runLuaNoEnv :: (PandocMonad m, MonadIO m) => LuaE PandocError a -> m (Either PandocError a)

-- | Constructs the Lua scripting engine.
getEngine :: MonadIO m => m ScriptingEngine
