Class: Semigroup instance for FileTree with base >= 4.9.

This commit is contained in:
John MacFarlane
2018-03-16 08:23:34 -07:00
parent 8360f9dedf
commit 0b5712e69b
+4
View File
@@ -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 =