on master help sign in
Move deriving Eq ZonedTime to a safer place
commitda2e953dcad3f248c671e218719a92fc854dd17c authorBryan O'Sullivan <bos@serpentine.com> dateMon 19 Nov 2012, 20:12 (14 years ago) parenta16acf5
2 files changed+4−5
Data/Aeson/Types/Class.hs+1−4 tests/Properties.hs+3−1
Data/Aeson/Types/Class.hs+1−4
@@ -1,7 +1,6 @@
11{-# LANGUAGE CPP, DeriveDataTypeable, FlexibleContexts, FlexibleInstances,
22 GeneralizedNewtypeDeriving, IncoherentInstances, OverlappingInstances,
3− OverloadedStrings, UndecidableInstances, ViewPatterns,
4− StandaloneDeriving #-}
3+ OverloadedStrings, UndecidableInstances, ViewPatterns #-}
54{-# OPTIONS_GHC -fno-warn-orphans #-}
65
76#ifdef GENERICS
@@ -625,8 +624,6 @@ instance FromJSON DotNetTime where
625624 parseJSON v = typeMismatch "DotNetTime" v
626625 {-# INLINE parseJSON #-}
627626
628−deriving instance Eq ZonedTime
629−
630627instance ToJSON ZonedTime where
631628 toJSON t = String $ pack $ formatTime defaultTimeLocale format t
632629 where
tests/Properties.hs+3−1
@@ -1,5 +1,5 @@
11{-# LANGUAGE DeriveDataTypeable, OverloadedStrings, RecordWildCards,
2− ScopedTypeVariables #-}
2+ ScopedTypeVariables, StandaloneDeriving #-}
33{-# OPTIONS_GHC -fno-warn-orphans #-}
44
55import Control.Monad
@@ -127,6 +127,8 @@ instance Arbitrary UFoo where
127127main :: IO ()
128128main = defaultMain tests
129129
130+deriving instance Eq ZonedTime
131+
130132tests :: [Test]
131133tests = [
132134 testGroup "regression" [