@@ -101,8 +101,8 @@ class (Finite self a ~ finite) => GArbitrary self a (finite :: Bool) where
101 gArbitrary :: Proxy self -> QC.Gen (a x)
101 gArbitrary :: Proxy self -> QC.Gen (a x)
104− ( GArbitrary self (C1 c f) 'True
104+ ( GArbitrary self (M1 C c f) 'True
105− ) => GArbitrary self (D1 t (C1 c f)) 'True where
105+ ) => GArbitrary self (M1 D t (M1 C c f)) 'True where
106 gArbitrary _ = M1 <$> gArbitrary (Proxy :: Proxy self)
106 gArbitrary _ = M1 <$> gArbitrary (Proxy :: Proxy self)
108-- | The constructor meta information
108-- | The constructor meta information
@@ -110,7 +110,7 @@ instance
110 ( GArbitrary self f some
110 ( GArbitrary self f some
111 , KnownNat (ArgumentsCount f)
111 , KnownNat (ArgumentsCount f)
112 , AllFieldsFinal self f ~ some
112 , AllFieldsFinal self f ~ some
113− ) => GArbitrary self (C1 c f) some where
113+ ) => GArbitrary self (M1 C c f) some where
114 gArbitrary _ = M1 <$> scale predNat (gArbitrary (Proxy :: Proxy self))
114 gArbitrary _ = M1 <$> scale predNat (gArbitrary (Proxy :: Proxy self))
116 argumentsCount = fromIntegral $ natVal (Proxy :: Proxy (ArgumentsCount f))
116 argumentsCount = fromIntegral $ natVal (Proxy :: Proxy (ArgumentsCount f))
@@ -123,14 +123,14 @@ instance GArbitrary self U1 'True where
123 gArbitrary _ = pure U1
123 gArbitrary _ = pure U1
125-- | Constructor field meta information
125-- | Constructor field meta information
126−instance GArbitrary self f some => GArbitrary self (S1 t f) some where
126+instance GArbitrary self f some => GArbitrary self (M1 S t f) some where
127 gArbitrary _ = M1 <$> gArbitrary (Proxy :: Proxy self)
127 gArbitrary _ = M1 <$> gArbitrary (Proxy :: Proxy self)
129-- | Data of the constructor field
129-- | Data of the constructor field
131 ( Arbitrary t
131 ( Arbitrary t
132− , Finite self (Rec0 t) ~ some
132+ , Finite self (K1 R t) ~ some
133− ) => GArbitrary self (Rec0 t) some where
133+ ) => GArbitrary self (K1 R t) some where
134 gArbitrary _ = K1 <$> arbitrary
134 gArbitrary _ = K1 <$> arbitrary
136-- | Product
136-- | Product
@@ -146,7 +146,7 @@ instance
147 ( TypeError (ShowType self :<>: Text " refers to itself in all constructors")
147 ( TypeError (ShowType self :<>: Text " refers to itself in all constructors")
148 , AllFieldsFinal self f ~ 'False
148 , AllFieldsFinal self f ~ 'False
149− ) => GArbitrary self (D1 t (C1 c f)) 'False where
149+ ) => GArbitrary self (M1 D t (M1 C c f)) 'False where
150 gArbitrary _ = error "Unreachable"
150 gArbitrary _ = error "Unreachable"
@@ -154,7 +154,7 @@ instance
155 ( FiniteSum self a b af bf
155 ( FiniteSum self a b af bf
156 , GArbitrary self (a :+: b) 'True
156 , GArbitrary self (a :+: b) 'True
157− ) => GArbitrary self (D1 t (a :+: b)) 'True where
157+ ) => GArbitrary self (M1 D t (a :+: b)) 'True where
158 gArbitrary _ = sized $ \s -> M1 <$>
158 gArbitrary _ = sized $ \s -> M1 <$>
160 then gArbitrary (Proxy :: Proxy self)
160 then gArbitrary (Proxy :: Proxy self)
@@ -210,8 +210,8 @@ instance
210 finiteElem _ = finiteSum (Proxy :: Proxy self)
210 finiteElem _ = finiteSum (Proxy :: Proxy self)
213− ( GArbitrary self (C1 c f) 'True
213+ ( GArbitrary self (M1 C c f) 'True
214− ) => FiniteSumElem self (C1 c f) where
214+ ) => FiniteSumElem self (M1 C c f) where
215 finiteElem _ = [gArbitrary (Proxy :: Proxy self)]
215 finiteElem _ = [gArbitrary (Proxy :: Proxy self)]
@@ -219,7 +219,7 @@ instance
220 ( TypeError (ShowType self :<>: Text " refers to itself in all constructors")
220 ( TypeError (ShowType self :<>: Text " refers to itself in all constructors")
221 , (Finite self a || Finite self b) ~ 'False
221 , (Finite self a || Finite self b) ~ 'False
222− ) => GArbitrary self (D1 t (a :+: b)) 'False where
222+ ) => GArbitrary self (M1 D t (a :+: b)) 'False where
223 gArbitrary _ = error "Unreachable"
223 gArbitrary _ = error "Unreachable"