@@ -1,3 +1,4 @@
1+{-# LANGUAGE DeriveDataTypeable #-}
12{-
23Copyright (C) 2012-2014 John MacFarlane <jgm@berkeley.edu>
34
@@ -51,6 +52,8 @@ import Data.Default
5152import Text.Pandoc.Highlighting (Style, pygments)
5253import Text.Pandoc.MediaBag (MediaBag)
5354import Data.Monoid
55+import Data.Data (Data)
56+import Data.Typeable (Typeable)
5457
5558-- | Individually selectable syntax extensions.
5659data Extension =
@@ -110,7 +113,7 @@ data Extension =
110113 | Ext_line_blocks -- ^ RST style line blocks
111114 | Ext_epub_html_exts -- ^ Recognise the EPUB extended version of HTML
112115 | Ext_shortcut_reference_links -- ^ Shortcut reference links
113− deriving (Show, Read, Enum, Eq, Ord, Bounded)
116+ deriving (Show, Read, Enum, Eq, Ord, Bounded, Data, Typeable)
114117
115118pandocExtensions :: Set Extension
116119pandocExtensions = Set.fromList
@@ -226,7 +229,7 @@ data ReaderOptions = ReaderOptions{
226229 , readerDefaultImageExtension :: String -- ^ Default extension for images
227230 , readerTrace :: Bool -- ^ Print debugging info
228231 , readerTrackChanges :: TrackChanges
229−} deriving (Show, Read)
232+} deriving (Show, Read, Data, Typeable)
230233
231234instance Default ReaderOptions
232235 where def = ReaderOptions{
@@ -248,7 +251,7 @@ instance Default ReaderOptions
248251-- Writer options
249252--
250253
251−data EPUBVersion = EPUB2 | EPUB3 deriving (Eq, Show, Read)
254+data EPUBVersion = EPUB2 | EPUB3 deriving (Eq, Show, Read, Data, Typeable)
252255
253256data HTMLMathMethod = PlainMath
254257 | LaTeXMathML (Maybe String) -- url of LaTeXMathML.js
@@ -258,18 +261,18 @@ data HTMLMathMethod = PlainMath
258261 | MathML (Maybe String) -- url of MathMLinHTML.js
259262 | MathJax String -- url of MathJax.js
260263 | KaTeX String String -- url of stylesheet and katex.js
261− deriving (Show, Read, Eq)
264+ deriving (Show, Read, Eq, Data, Typeable)
262265
263266data CiteMethod = Citeproc -- use citeproc to render them
264267 | Natbib -- output natbib cite commands
265268 | Biblatex -- output biblatex cite commands
266− deriving (Show, Read, Eq)
269+ deriving (Show, Read, Eq, Data, Typeable)
267270
268271-- | Methods for obfuscating email addresses in HTML.
269272data ObfuscationMethod = NoObfuscation
270273 | ReferenceObfuscation
271274 | JavascriptObfuscation
272− deriving (Show, Read, Eq)
275+ deriving (Show, Read, Eq, Data, Typeable)
273276
274277-- | Varieties of HTML slide shows.
275278data HTMLSlideVariant = S5Slides
@@ -278,13 +281,13 @@ data HTMLSlideVariant = S5Slides
278281 | DZSlides
279282 | RevealJsSlides
280283 | NoSlides
281− deriving (Show, Read, Eq)
284+ deriving (Show, Read, Eq, Data, Typeable)
282285
283286-- | Options for accepting or rejecting MS Word track-changes.
284287data TrackChanges = AcceptChanges
285288 | RejectChanges
286289 | AllChanges
287− deriving (Show, Read, Eq)
290+ deriving (Show, Read, Eq, Data, Typeable)
288291
289292-- | Options for writers
290293data WriterOptions = WriterOptions
@@ -331,7 +334,7 @@ data WriterOptions = WriterOptions
331334 , writerMediaBag :: MediaBag -- ^ Media collected by docx or epub reader
332335 , writerVerbose :: Bool -- ^ Verbose debugging output
333336 , writerLaTeXArgs :: [String] -- ^ Flags to pass to latex-engine
334− } deriving Show
337+ } deriving (Show, Data, Typeable)
335338
336339instance Default WriterOptions where
337340 def = WriterOptions { writerStandalone = False