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
|
#else
|
||||||
|
|
||||||
newtype ModTime = ModTime ClockTime
|
newtype ModTime = ModTime ClockTime
|
||||||
deriving (Eq, Ord, NFData)
|
deriving (Eq, Ord)
|
||||||
getCurrentModTime = ModTime <$> getClockTime
|
getCurrentModTime = ModTime <$> getClockTime
|
||||||
|
|
||||||
instance Binary ModTime where
|
instance Binary ModTime where
|
||||||
@ -51,6 +51,10 @@ instance Binary ModTime where
|
|||||||
get =
|
get =
|
||||||
ModTime <$> (TOD <$> get <*> get)
|
ModTime <$> (TOD <$> get <*> get)
|
||||||
|
|
||||||
|
instance NFData ModTime where
|
||||||
|
rnf (ModTime (TOD s ps)) =
|
||||||
|
s `seq` ps `seq` (ModTime $! TOD s ps) `seq` ()
|
||||||
|
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
getCurrentModTime :: IO ModTime
|
getCurrentModTime :: IO ModTime
|
||||||
|
Loading…
Reference in New Issue
Block a user