Use Binary for 'find' communication channel

This commit is contained in:
Nikolay Yakimov
2016-01-09 17:27:21 +03:00
parent b9c796421f
commit 68689bfcfd
6 changed files with 50 additions and 30 deletions

View File

@@ -13,10 +13,11 @@
--
-- You should have received a copy of the GNU Affero General Public License
-- along with this program. If not, see <http://www.gnu.org/licenses/>.
{-# LANGUAGE CPP, StandaloneDeriving #-}
{-# LANGUAGE CPP, GeneralizedNewtypeDeriving #-}
module System.Directory.ModTime where
import Control.Applicative
import Control.DeepSeq
import Data.Binary
#if MIN_VERSION_directory(1,2,0)
import Data.Time (UTCTime(..), Day(..), getCurrentTime)
@@ -29,7 +30,7 @@ import Prelude
#if MIN_VERSION_directory(1,2,0)
newtype ModTime = ModTime UTCTime
deriving (Eq, Ord, Show, Read)
deriving (Eq, Ord, NFData)
getCurrentModTime = ModTime <$> getCurrentTime
instance Binary ModTime where
@@ -40,9 +41,8 @@ instance Binary ModTime where
#else
deriving instance Read ClockTime
newtype ModTime = ModTime ClockTime
deriving (Eq, Ord, Show, Read)
deriving (Eq, Ord, NFData)
getCurrentModTime = ModTime <$> getClockTime
instance Binary ModTime where