git.iko.soy/typeable/pandoc
on master help sign in
Translations: Semigroup instance for Translations with base >= 4.9.
commit8360f9dedfc7298c2807c2e0911dd51fc2acbc3e authorJohn MacFarlane <jgm@berkeley.edu> dateFri 16 Mar 2018, 08:21 (9 years ago) parent0cbb811
1 file changed+5
src/Text/Pandoc/Translations.hs+5
src/Text/Pandoc/Translations.hs+5
@@ -1,3 +1,4 @@
1+{-# LANGUAGE CPP #-}
12{-# LANGUAGE DeriveGeneric #-}
23{-# LANGUAGE GeneralizedNewtypeDeriving #-}
34{-
@@ -80,7 +81,11 @@ data Term =
8081 deriving (Show, Eq, Ord, Generic, Enum, Read)
8182
8283newtype Translations = Translations (M.Map Term String)
84+#if MIN_VERSION_base(4,9,0)
85+ deriving (Show, Generic, Semigroup, Monoid)
86+#else
8387 deriving (Show, Generic, Monoid)
88+#endif
8489
8590instance FromJSON Term where
8691 parseJSON (String t) = case safeRead (T.unpack t) of