Added Text.Pandoc.Compat.Monoid.
This allows pandoc to compile with base < 4.5, where Data.Monoid doesn't export `<>`. Thanks to Dirk Ullirch for the patch.
This commit is contained in:
parent
bb61624bb2
commit
802dc9a8b9
4 changed files with 19 additions and 2 deletions
|
@ -335,6 +335,7 @@ Library
|
|||
Text.Pandoc.ImageSize,
|
||||
Text.Pandoc.Slides,
|
||||
Text.Pandoc.Highlighting,
|
||||
Text.Pandoc.Compat.Monoid,
|
||||
Paths_pandoc
|
||||
|
||||
Buildable: True
|
||||
|
|
16
src/Text/Pandoc/Compat/Monoid.hs
Normal file
16
src/Text/Pandoc/Compat/Monoid.hs
Normal file
|
@ -0,0 +1,16 @@
|
|||
{-# LANGUAGE CPP #-}
|
||||
module Text.Pandoc.Compat.Monoid ( Monoid(..)
|
||||
, (<>)
|
||||
) where
|
||||
|
||||
#if MIN_VERSION_base(4,5,0)
|
||||
import Data.Monoid ((<>), Monoid(..))
|
||||
#else
|
||||
import Data.Monoid (mappend, Monoid(..))
|
||||
#endif
|
||||
|
||||
#if MIN_VERSION_base(4,5,0)
|
||||
#else
|
||||
(<>) :: Monoid m => m -> m -> m
|
||||
(<>) = mappend
|
||||
#endif
|
|
@ -102,7 +102,7 @@ import Control.Applicative
|
|||
import qualified Data.Text as T
|
||||
import Data.Text (Text)
|
||||
import Data.Text.Encoding (encodeUtf8)
|
||||
import Data.Monoid ((<>), Monoid(..))
|
||||
import Text.Pandoc.Compat.Monoid ((<>), Monoid(..))
|
||||
import Data.List (intersperse, nub)
|
||||
import System.FilePath ((</>), (<.>))
|
||||
import qualified Data.Map as M
|
||||
|
|
|
@ -35,7 +35,7 @@ import qualified Data.ByteString.Lazy as BL
|
|||
import qualified Data.ByteString.Lazy.Char8 as BL8
|
||||
import qualified Data.Map as M
|
||||
import qualified Text.Pandoc.UTF8 as UTF8
|
||||
import Data.Monoid ((<>))
|
||||
import Text.Pandoc.Compat.Monoid ((<>))
|
||||
import Codec.Archive.Zip
|
||||
import Data.Time.Clock.POSIX
|
||||
import Text.Pandoc.Definition
|
||||
|
|
Loading…
Reference in a new issue