NFData fix for ClockTime on GHC 7.4

This commit is contained in:
Nikolay Yakimov 2016-01-09 17:43:51 +03:00
parent 68689bfcfd
commit c9a832de0f
1 changed files with 5 additions and 1 deletions

View File

@ -42,7 +42,7 @@ instance Binary ModTime where
#else
newtype ModTime = ModTime ClockTime
deriving (Eq, Ord, NFData)
deriving (Eq, Ord)
getCurrentModTime = ModTime <$> getClockTime
instance Binary ModTime where
@ -51,6 +51,10 @@ instance Binary ModTime where
get =
ModTime <$> (TOD <$> get <*> get)
instance NFData ModTime where
rnf (ModTime (TOD s ps)) =
s `seq` ps `seq` (ModTime $! TOD s ps) `seq` ()
#endif
getCurrentModTime :: IO ModTime