From 0b5712e69b054442ccb10be3c1aab4f8dcdb7efd Mon Sep 17 00:00:00 2001 From: John MacFarlane Date: Fri, 16 Mar 2018 08:23:34 -0700 Subject: Class: Semigroup instance for FileTree with base >= 4.9. --- src/Text/Pandoc/Class.hs | 4 ++++ 1 file changed, 4 insertions(+) (limited to 'src/Text/Pandoc/Class.hs') diff --git a/src/Text/Pandoc/Class.hs b/src/Text/Pandoc/Class.hs index aa0379942..f7544433c 100644 --- a/src/Text/Pandoc/Class.hs +++ b/src/Text/Pandoc/Class.hs @@ -923,7 +923,11 @@ data FileInfo = FileInfo { infoFileMTime :: UTCTime } newtype FileTree = FileTree {unFileTree :: M.Map FilePath FileInfo} +#if MIN_VERSION_base(4,9,0) + deriving (Semigroup, Monoid) +#else deriving (Monoid) +#endif getFileInfo :: FilePath -> FileTree -> Maybe FileInfo getFileInfo fp tree = -- cgit v1.2.3