summaryrefslogtreecommitdiff
path: root/src/Text/Pandoc/Writers/Custom.hs
diff options
context:
space:
mode:
authorAlbert Krewinkel <albert@zeitkraut.de>2017-08-16 15:47:05 +0200
committerAlbert Krewinkel <albert@zeitkraut.de>2017-08-16 15:47:05 +0200
commit9b318355300ca43aadede728c179785f40326d5c (patch)
tree1fc440cda2961e6fcb4f90e0f3f162970cd55c42 /src/Text/Pandoc/Writers/Custom.hs
parentf8b6a224aec780785baf3112f24c44f6c424e6ba (diff)
Update to hslua-0.8.0
hslua no longer provides lua stack instances for Int and Double, the necessary instances are added to the Custom writer and the lua filtering system.
Diffstat (limited to 'src/Text/Pandoc/Writers/Custom.hs')
-rw-r--r--src/Text/Pandoc/Writers/Custom.hs6
1 files changed, 6 insertions, 0 deletions
diff --git a/src/Text/Pandoc/Writers/Custom.hs b/src/Text/Pandoc/Writers/Custom.hs
index 63725bb60..d7dff6d19 100644
--- a/src/Text/Pandoc/Writers/Custom.hs
+++ b/src/Text/Pandoc/Writers/Custom.hs
@@ -60,6 +60,12 @@ attrToMap (id',classes,keyvals) = M.fromList
: ("class", unwords classes)
: keyvals
+instance ToLuaStack Double where
+ push = push . (realToFrac :: Double -> LuaNumber)
+
+instance ToLuaStack Int where
+ push = push . (fromIntegral :: Int -> LuaInteger)
+
instance ToLuaStack Format where
push (Format f) = push (map toLower f)