diff options
author | Shahbaz Youssefi <ShabbyX@gmail.com> | 2015-03-19 17:07:18 +0100 |
---|---|---|
committer | Shahbaz Youssefi <ShabbyX@gmail.com> | 2015-03-19 17:07:18 +0100 |
commit | e952d6633fbfb6355ad41ae9898d72982892e11a (patch) | |
tree | d0162fcb4ea6189880fd96c477cd5be09b9f4935 /src/Text/Pandoc/MediaBag.hs | |
parent | 0a82e7e4b1d912108d0dc909d7e4969464b28fd8 (diff) |
Derive from Data and Typeable for libpandoc
This commit derives a few types from Data and Typeable used by
libpandoc.
Requires corresponding pull-request for Highlighting-Kate:
https://github.com/jgm/highlighting-kate/pull/64
Signed-off-by: Shahbaz Youssefi <ShabbyX@gmail.com>
Diffstat (limited to 'src/Text/Pandoc/MediaBag.hs')
-rw-r--r-- | src/Text/Pandoc/MediaBag.hs | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/src/Text/Pandoc/MediaBag.hs b/src/Text/Pandoc/MediaBag.hs index a55d5417e..1246cdc8f 100644 --- a/src/Text/Pandoc/MediaBag.hs +++ b/src/Text/Pandoc/MediaBag.hs @@ -1,4 +1,4 @@ -{-# LANGUAGE GeneralizedNewtypeDeriving #-} +{-# LANGUAGE GeneralizedNewtypeDeriving, DeriveDataTypeable #-} {- Copyright (C) 2014 John MacFarlane <jgm@berkeley.edu> @@ -46,13 +46,15 @@ import Text.Pandoc.MIME (MimeType, getMimeTypeDef) import qualified Text.Pandoc.UTF8 as UTF8 import Data.Maybe (fromMaybe) import System.IO (stderr) +import Data.Data (Data) +import Data.Typeable (Typeable) -- | A container for a collection of binary resources, with names and -- mime types. Note that a 'MediaBag' is a Monoid, so 'mempty' -- 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)) - deriving (Monoid) + deriving (Monoid, Data, Typeable) instance Show MediaBag where show bag = "MediaBag " ++ show (mediaDirectory bag) |