Commits

Bryan O'Sullivan committed 17aec77

Move deriving Eq ZonedTime to a safer place

Comments (0)

Files changed (2)

Data/Aeson/Types/Class.hs

 {-# LANGUAGE CPP, DeriveDataTypeable, FlexibleContexts, FlexibleInstances,
     GeneralizedNewtypeDeriving, IncoherentInstances, OverlappingInstances,
-    OverloadedStrings, UndecidableInstances, ViewPatterns,
-    StandaloneDeriving #-}
+    OverloadedStrings, UndecidableInstances, ViewPatterns #-}
 {-# OPTIONS_GHC -fno-warn-orphans #-}
 
 #ifdef GENERICS
     parseJSON v   = typeMismatch "DotNetTime" v
     {-# INLINE parseJSON #-}
 
-deriving instance Eq ZonedTime
-
 instance ToJSON ZonedTime where
   toJSON t = String $ pack $ formatTime defaultTimeLocale format t
     where

tests/Properties.hs

 {-# LANGUAGE DeriveDataTypeable, OverloadedStrings, RecordWildCards,
-    ScopedTypeVariables #-}
+    ScopedTypeVariables, StandaloneDeriving #-}
 {-# OPTIONS_GHC -fno-warn-orphans #-}
 
 import Control.Monad
 main :: IO ()
 main = defaultMain tests
 
+deriving instance Eq ZonedTime
+
 tests :: [Test]
 tests = [
   testGroup "regression" [