Pretty: Semigroup instance for Doc with base >= 4.9.

This commit is contained in:
John MacFarlane 2018-03-16 08:12:33 -07:00
parent ec1e2c87b7
commit 07e0981316

View file

@ -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