Derive ZonedTime Eq instance
This commit is contained in:
parent
8222c6041d
commit
dce37d7b9d
1 changed files with 2 additions and 3 deletions
|
@ -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)
|
||||
|
||||
|
|
Reference in a new issue