From dce37d7b9df388110bc28181896fc17531cf57a3 Mon Sep 17 00:00:00 2001 From: Matthias Schiffer Date: Sun, 21 Aug 2011 21:40:31 +0200 Subject: Derive ZonedTime Eq instance --- lib/Phi/Widgets/Clock.hs | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) (limited to 'lib/Phi') diff --git a/lib/Phi/Widgets/Clock.hs b/lib/Phi/Widgets/Clock.hs index 38b6c41..a11ef9e 100644 --- a/lib/Phi/Widgets/Clock.hs +++ b/lib/Phi/Widgets/Clock.hs @@ -1,4 +1,4 @@ -{-# LANGUAGE MultiParamTypeClasses, DeriveDataTypeable, TypeSynonymInstances, FlexibleInstances #-} +{-# LANGUAGE MultiParamTypeClasses, DeriveDataTypeable, TypeSynonymInstances, FlexibleInstances, StandaloneDeriving #-} module Phi.Widgets.Clock ( ClockConfig(..) , defaultClockConfig @@ -36,8 +36,7 @@ defaultClockConfig = ClockConfig "%R" (0, 0, 0, 1) 0 50 data Clock = Clock !ClockConfig deriving (Show, Eq) -instance Eq ZonedTime where - (ZonedTime localTime timezone) == (ZonedTime localTime' timezone') = (localTime == localTime') && (timezone == timezone') +deriving instance Eq ZonedTime data ClockState = ClockState !ZonedTime deriving (Show, Eq) -- cgit v1.2.3