From 8360f9dedfc7298c2807c2e0911dd51fc2acbc3e Mon Sep 17 00:00:00 2001 From: John MacFarlane Date: Fri, 16 Mar 2018 08:21:52 -0700 Subject: Translations: Semigroup instance for Translations with base >= 4.9. --- src/Text/Pandoc/Translations.hs | 5 +++++ 1 file changed, 5 insertions(+) (limited to 'src/Text/Pandoc') 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 -- cgit v1.2.3