aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--src/Text/Pandoc/Translations.hs5
1 files changed, 5 insertions, 0 deletions
diff --git a/src/Text/Pandoc/Translations.hs b/src/Text/Pandoc/Translations.hs
index 949618178..cc4b1ebba 100644
--- a/src/Text/Pandoc/Translations.hs
+++ b/src/Text/Pandoc/Translations.hs
@@ -1,3 +1,4 @@
+{-# LANGUAGE CPP #-}
{-# LANGUAGE DeriveGeneric #-}
{-# LANGUAGE GeneralizedNewtypeDeriving #-}
{-
@@ -80,7 +81,11 @@ data Term =
deriving (Show, Eq, Ord, Generic, Enum, Read)
newtype Translations = Translations (M.Map Term String)
+#if MIN_VERSION_base(4,9,0)
+ deriving (Show, Generic, Semigroup, Monoid)
+#else
deriving (Show, Generic, Monoid)
+#endif
instance FromJSON Term where
parseJSON (String t) = case safeRead (T.unpack t) of