diff --git a/System/Directory/ModTime.hs b/System/Directory/ModTime.hs index 563a366..0e38eae 100644 --- a/System/Directory/ModTime.hs +++ b/System/Directory/ModTime.hs @@ -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