NFData fix for ClockTime on GHC 7.4
This commit is contained in:
parent
68689bfcfd
commit
c9a832de0f
@ -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
|
||||
|
Loading…
Reference in New Issue
Block a user