aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAlbert Krewinkel <[email protected]>2022-02-19 20:26:18 +0100
committerGitHub <[email protected]>2022-02-19 11:26:18 -0800
commita3117bc1420d8f3f8db39957c62bc3af8a3aef1f (patch)
tree41c7181589c90ed8c860b95e2396c4d722df1bdf
parentfb465070eb3b21ac88b8758216affdf57e816803 (diff)
Relax upper bound for hslua, allow hslua-2.2. (#7929)
Lua 5.4 is used by default after this is merged. Packagers may still include Lua 5.3 instead by building pandoc with `--constraint='hslua <2.2'`. Differences between 5.3 and 5.4 should not generally affect pandoc Lua filters. See list of incompatible changes here <https://www.lua.org/manual/5.4/manual.html#8.1>
-rw-r--r--pandoc.cabal8
-rw-r--r--src/Text/Pandoc/Lua/Marshal/ReaderOptions.hs3
-rw-r--r--src/Text/Pandoc/Lua/Marshal/WriterOptions.hs3
-rw-r--r--src/Text/Pandoc/Lua/Writer/Classic.hs3
-rw-r--r--stack.yaml36
5 files changed, 31 insertions, 22 deletions
diff --git a/pandoc.cabal b/pandoc.cabal
index 2a964a91b..0a670c49b 100644
--- a/pandoc.cabal
+++ b/pandoc.cabal
@@ -481,9 +481,9 @@ library
file-embed >= 0.0 && < 0.1,
filepath >= 1.1 && < 1.5,
haddock-library >= 1.10 && < 1.11,
- hslua >= 2.1 && < 2.2,
- hslua-aeson >= 2.1 && < 2.2,
- hslua-marshalling >= 2.1 && < 2.2,
+ hslua >= 2.1 && < 2.3,
+ hslua-aeson >= 2.1 && < 2.3,
+ hslua-marshalling >= 2.1 && < 2.3,
hslua-module-doclayout>= 1.0.2 && < 1.1,
hslua-module-path >= 1.0 && < 1.1,
hslua-module-system >= 1.0 && < 1.1,
@@ -786,7 +786,7 @@ test-suite test-pandoc
doctemplates >= 0.10 && < 0.11,
exceptions >= 0.8 && < 0.11,
filepath >= 1.1 && < 1.5,
- hslua >= 2.1 && < 2.2,
+ hslua >= 2.1 && < 2.3,
mtl >= 2.2 && < 2.3,
pandoc-types >= 1.22.1 && < 1.23,
process >= 1.2.3 && < 1.7,
diff --git a/src/Text/Pandoc/Lua/Marshal/ReaderOptions.hs b/src/Text/Pandoc/Lua/Marshal/ReaderOptions.hs
index 1b3acc076..bec7d81bf 100644
--- a/src/Text/Pandoc/Lua/Marshal/ReaderOptions.hs
+++ b/src/Text/Pandoc/Lua/Marshal/ReaderOptions.hs
@@ -1,3 +1,4 @@
+{-# LANGUAGE CPP #-}
{-# LANGUAGE LambdaCase #-}
{-# LANGUAGE OverloadedStrings #-}
{-# LANGUAGE ScopedTypeVariables #-}
@@ -21,7 +22,9 @@ module Text.Pandoc.Lua.Marshal.ReaderOptions
import Data.Default (def)
import HsLua as Lua
+#if !MIN_VERSION_hslua(2,2,0)
import HsLua.Aeson (peekViaJSON, pushViaJSON)
+#endif
import Text.Pandoc.Lua.Marshal.List (pushPandocList)
import Text.Pandoc.Options (ReaderOptions (..))
diff --git a/src/Text/Pandoc/Lua/Marshal/WriterOptions.hs b/src/Text/Pandoc/Lua/Marshal/WriterOptions.hs
index 639b85422..86df682c5 100644
--- a/src/Text/Pandoc/Lua/Marshal/WriterOptions.hs
+++ b/src/Text/Pandoc/Lua/Marshal/WriterOptions.hs
@@ -1,3 +1,4 @@
+{-# LANGUAGE CPP #-}
{-# LANGUAGE LambdaCase #-}
{-# LANGUAGE OverloadedStrings #-}
{-# LANGUAGE ScopedTypeVariables #-}
@@ -20,7 +21,9 @@ module Text.Pandoc.Lua.Marshal.WriterOptions
import Control.Applicative (optional)
import Data.Default (def)
import HsLua as Lua
+#if !MIN_VERSION_hslua(2,2,0)
import HsLua.Aeson (peekViaJSON, pushViaJSON)
+#endif
import Text.Pandoc.Lua.Marshal.List (pushPandocList)
import Text.Pandoc.Lua.Marshal.Template (peekTemplate, pushTemplate)
import Text.Pandoc.Options (WriterOptions (..))
diff --git a/src/Text/Pandoc/Lua/Writer/Classic.hs b/src/Text/Pandoc/Lua/Writer/Classic.hs
index 6b021911c..58f6efa33 100644
--- a/src/Text/Pandoc/Lua/Writer/Classic.hs
+++ b/src/Text/Pandoc/Lua/Writer/Classic.hs
@@ -1,3 +1,4 @@
+{-# LANGUAGE CPP #-}
{-# LANGUAGE FlexibleContexts #-}
{-# LANGUAGE FlexibleInstances #-}
{-# LANGUAGE OverloadedStrings #-}
@@ -24,7 +25,9 @@ import Data.Maybe (fromMaybe)
import qualified Data.Text as T
import Data.Text (Text, pack)
import HsLua as Lua hiding (Operation (Div))
+#if !MIN_VERSION_hslua(2,2,0)
import HsLua.Aeson (peekViaJSON)
+#endif
import Text.DocLayout (literal, render)
import Text.DocTemplates (Context)
import Text.Pandoc.Definition
diff --git a/stack.yaml b/stack.yaml
index 42204bf32..4d303b8ce 100644
--- a/stack.yaml
+++ b/stack.yaml
@@ -12,24 +12,24 @@ extra-deps:
- doctemplates-0.10.0.1
- emojis-0.1.2
- doclayout-0.3.1.1
-- lpeg-1.0.2
-- hslua-2.1.0
-- hslua-aeson-2.1.0
-- hslua-classes-2.1.0
-- hslua-core-2.1.0
-- hslua-marshalling-2.1.0
-- hslua-module-doclayout-1.0.2
-- hslua-module-path-1.0.1
-- hslua-module-system-1.0.1
-- hslua-module-text-1.0.1
-- hslua-module-version-1.0.1
-- hslua-objectorientation-2.1.0
-- hslua-packaging-2.1.0
-- lua-2.1.0
-- lua-arbitrary-1.0.0
-- tasty-hslua-1.0.1
-- tasty-lua-1.0.1
-- pandoc-lua-marshal-0.1.5
+- lpeg-1.0.3
+- hslua-2.2.0
+- hslua-aeson-2.2.0
+- hslua-classes-2.2.0
+- hslua-core-2.2.0
+- hslua-marshalling-2.2.0
+- hslua-module-doclayout-1.0.3
+- hslua-module-path-1.0.2
+- hslua-module-system-1.0.2
+- hslua-module-text-1.0.2
+- hslua-module-version-1.0.2
+- hslua-objectorientation-2.2.0
+- hslua-packaging-2.2.0
+- lua-2.2.0
+- lua-arbitrary-1.0.1
+- tasty-hslua-1.0.2
+- tasty-lua-1.0.2
+- pandoc-lua-marshal-0.1.5.1
- pandoc-types-1.22.1
- aeson-pretty-0.8.9
- unicode-transforms-0.4.0@rev:1