diff options
| author | Albert Krewinkel <albert@zeitkraut.de> | 2022-02-19 20:26:18 +0100 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2022-02-19 11:26:18 -0800 |
| commit | a3117bc1420d8f3f8db39957c62bc3af8a3aef1f (patch) | |
| tree | 41c7181589c90ed8c860b95e2396c4d722df1bdf /src/Text | |
| parent | fb465070eb3b21ac88b8758216affdf57e816803 (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>
Diffstat (limited to 'src/Text')
| -rw-r--r-- | src/Text/Pandoc/Lua/Marshal/ReaderOptions.hs | 3 | ||||
| -rw-r--r-- | src/Text/Pandoc/Lua/Marshal/WriterOptions.hs | 3 | ||||
| -rw-r--r-- | src/Text/Pandoc/Lua/Writer/Classic.hs | 3 |
3 files changed, 9 insertions, 0 deletions
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 |
