From c9a832de0f92f988d05b1220bea3eb1ea9d060ab Mon Sep 17 00:00:00 2001 From: Nikolay Yakimov Date: Sat, 9 Jan 2016 17:43:51 +0300 Subject: [PATCH] NFData fix for ClockTime on GHC 7.4 --- System/Directory/ModTime.hs | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) 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