@@ -135,11 +135,13 @@ instance
135135 gArbitrary _ = liftA2 (:*:)
136136 (gArbitrary (Proxy :: Proxy self)) (gArbitrary (Proxy :: Proxy self))
137137
138+#if __GLASGOW_HASKELL__ >= 800
138139instance
139140 ( TypeError (ShowType self :<>: Text " refers to itself in all constructors")
140141 , AllFieldsFinal self f ~ 'False
141142 ) => GArbitrary self (D1 t (C1 c f)) 'False where
142143 gArbitrary _ = error "Unreachable"
144+#endif
143145
144146-- | ADT declaration with multiple constructors
145147instance
@@ -205,11 +207,14 @@ instance
205207 ) => FiniteSumElem self (C1 c f) where
206208 finiteElem _ = [gArbitrary (Proxy :: Proxy self)]
207209
210+
211+#if __GLASGOW_HASKELL__ >= 800
208212instance
209213 ( TypeError (ShowType self :<>: Text " refers to itself in all constructors")
210214 , (Finite self a || Finite self b) ~ 'False
211215 ) => GArbitrary self (D1 t (a :+: b)) 'False where
212216 gArbitrary _ = error "Unreachable"
217+#endif
213218
214219genericArbitrary
215220 :: forall a ga some