aboutsummaryrefslogtreecommitdiff
path: root/src/Text/Pandoc/MediaBag.hs
diff options
context:
space:
mode:
Diffstat (limited to 'src/Text/Pandoc/MediaBag.hs')
-rw-r--r--src/Text/Pandoc/MediaBag.hs5
1 files changed, 5 insertions, 0 deletions
diff --git a/src/Text/Pandoc/MediaBag.hs b/src/Text/Pandoc/MediaBag.hs
index 0d060fe1a..a962db674 100644
--- a/src/Text/Pandoc/MediaBag.hs
+++ b/src/Text/Pandoc/MediaBag.hs
@@ -1,3 +1,4 @@
+{-# LANGUAGE CPP #-}
{-# LANGUAGE DeriveDataTypeable #-}
{-# LANGUAGE GeneralizedNewtypeDeriving #-}
{-
@@ -50,7 +51,11 @@ import Text.Pandoc.MIME (MimeType, getMimeTypeDef)
-- can be used for an empty 'MediaBag', and '<>' can be used to append
-- two 'MediaBag's.
newtype MediaBag = MediaBag (M.Map [String] (MimeType, BL.ByteString))
+#if MIN_VERSION_base(4,9,0)
+ deriving (Semigroup, Monoid, Data, Typeable)
+#else
deriving (Monoid, Data, Typeable)
+#endif
instance Show MediaBag where
show bag = "MediaBag " ++ show (mediaDirectory bag)