Use Binary for 'find' communication channel
This commit is contained in:
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user