aboutsummaryrefslogtreecommitdiff
path: root/src/Text/Pandoc/Lua.hs
diff options
context:
space:
mode:
authorAlbert Krewinkel <albert@zeitkraut.de>2018-10-26 23:45:01 +0200
committerJohn MacFarlane <jgm@berkeley.edu>2018-10-28 12:08:52 -0700
commitf6124213073cf162bd3cfa5e6d455807e8a502a9 (patch)
tree4cdca64cce0097389a6ab4031511f6d43cd9d204 /src/Text/Pandoc/Lua.hs
parent6f29e1c9c1fc4c655c5ca4fad9e9256f8313d7bd (diff)
downloadpandoc-f6124213073cf162bd3cfa5e6d455807e8a502a9.tar.gz
T.P.Lua: expose more useful internals (API change)
Newly exported from Text.Pandoc.Lua: - `runFilterFile` to run a Lua filter from file; - data type `Global` and its constructors; and - `setGlobals` to add globals to a Lua environment. This module also contains `Pushable` and `Peekable` instances required to get pandoc's data types to and from Lua. Low-level Lua operation remain hidden in Text.Pandoc.Lua.
Diffstat (limited to 'src/Text/Pandoc/Lua.hs')
-rw-r--r--src/Text/Pandoc/Lua.hs14
1 files changed, 11 insertions, 3 deletions
diff --git a/src/Text/Pandoc/Lua.hs b/src/Text/Pandoc/Lua.hs
index 3f4d2df07..0a7e6e721 100644
--- a/src/Text/Pandoc/Lua.hs
+++ b/src/Text/Pandoc/Lua.hs
@@ -1,3 +1,4 @@
+{-# LANGUAGE NoImplicitPrelude #-}
{-
Copyright © 2017–2018 Albert Krewinkel <tarleb+pandoc@moltkeplatz.de>
@@ -15,7 +16,6 @@ You should have received a copy of the GNU General Public License
along with this program; if not, write to the Free Software
Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
-}
-{-# LANGUAGE NoImplicitPrelude #-}
{- |
Module : Text.Pandoc.Lua
Copyright : Copyright © 2017–2018 Albert Krewinkel
@@ -27,9 +27,17 @@ Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
Running pandoc Lua filters.
-}
module Text.Pandoc.Lua
- ( LuaException (..)
- , runLua
+ ( runLua
+ , LuaException (..)
+ -- * Lua globals
+ , Global (..)
+ , setGlobals
+ -- * Filters
+ , runFilterFile
) where
+import Text.Pandoc.Lua.Filter (runFilterFile)
+import Text.Pandoc.Lua.Global (Global (..), setGlobals)
import Text.Pandoc.Lua.Init (LuaException (..), runLua)
+import Text.Pandoc.Lua.StackInstances ()