@@ -25,11 +25,8 @@ import Encoders
2525import Properties.Deprecated (deprecatedTests)
2626import System.IO
2727import System.IO.Unsafe (unsafePerformIO)
28−
29−#ifdef GHC_GENERICS
3028import Data.Int
3129import qualified Data.Map as Map
32−#endif
3330
3431#if !MIN_VERSION_time(1,5,0)
3532import System.Locale (defaultTimeLocale, dateTimeFmt)
@@ -153,10 +150,8 @@ main = do
153150 comparisonTest <- encoderComparisonTests
154151 defaultMain (comparisonTest : tests)
155152
156−#ifdef GHC_GENERICS
157153type P6 = Product6 Int Bool String (Approx Double) (Int, Approx Double) ()
158154type S4 = Sum4 Int8 ZonedTime T.Text (Map.Map String Int)
159−#endif
160155
161156--------------------------------------------------------------------------------
162157-- Value properties
@@ -207,14 +202,12 @@ tests = [
207202 , testProperty "DotNetTime" $ roundTripEq (undefined :: DotNetTime)
208203 , testProperty "UTCTime" $ roundTripEq (undefined :: UTCTime)
209204 , testProperty "ZonedTime" $ roundTripEq (undefined :: ZonedTime)
210−#ifdef GHC_GENERICS
211205 , testGroup "ghcGenerics" [
212206 testProperty "OneConstructor" $ roundTripEq OneConstructor
213207 , testProperty "Product2" $ roundTripEq (undefined :: Product2 Int Bool)
214208 , testProperty "Product6" $ roundTripEq (undefined :: P6)
215209 , testProperty "Sum4" $ roundTripEq (undefined :: S4)
216210 ]
217−#endif
218211 ],
219212 testGroup "toFromJSON" [
220213 testProperty "Integer" (toFromJSON :: Integer -> Bool)
@@ -254,7 +247,6 @@ tests = [
254247 ]
255248 ]
256249 ]
257−#ifdef GHC_GENERICS
258250 , testGroup "GHC-generics" [
259251 testGroup "Nullary" [
260252 testProperty "string" (isString . gNullaryToJSONString)
@@ -291,7 +283,6 @@ tests = [
291283 ]
292284 ]
293285 ]
294−#endif
295286 ]
296287
297288