aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJohn MacFarlane <jgm@berkeley.edu>2018-03-16 08:12:33 -0700
committerJohn MacFarlane <jgm@berkeley.edu>2018-03-16 08:12:33 -0700
commit07e098131633e5480b7a274ce28f329bd4f9e46b (patch)
treef756361adc357abdcaf1eea301a33410ce64e4c9
parentec1e2c87b78e2f57e91a650bee329f083abec9bf (diff)
downloadpandoc-07e098131633e5480b7a274ce28f329bd4f9e46b.tar.gz
Pretty: Semigroup instance for Doc with base >= 4.9.
-rw-r--r--src/Text/Pandoc/Pretty.hs4
1 files changed, 4 insertions, 0 deletions
diff --git a/src/Text/Pandoc/Pretty.hs b/src/Text/Pandoc/Pretty.hs
index 25c2373a6..7f695c4d7 100644
--- a/src/Text/Pandoc/Pretty.hs
+++ b/src/Text/Pandoc/Pretty.hs
@@ -112,7 +112,11 @@ data D = Text Int String
deriving (Show, Eq)
newtype Doc = Doc { unDoc :: Seq D }
+#if MIN_VERSION_base(4,9,0)
+ deriving (Semigroup, Monoid, Show, Eq)
+#else
deriving (Monoid, Show, Eq)
+#endif
instance IsString Doc where
fromString = text