generic-arbitrary 0.2.0 → 0.2.1
raw patch · 3 files changed
+11/−5 lines, 3 filesdep ~basePVP ok
version bump matches the API change (PVP)
Dependency ranges changed: base
API changes (from Hackage documentation)
Files
CHANGELOG.md view
@@ -1,3 +1,8 @@+0.2.1+-----++* Added compatibility with GHC 9.2.1+ 0.2.0 -----
generic-arbitrary.cabal view
@@ -1,5 +1,5 @@ name: generic-arbitrary-version: 0.2.0+version: 0.2.1 synopsis: Generic implementation for QuickCheck's Arbitrary description: Generic implementations of methods of the 'Arbitrary' class from the@@ -15,13 +15,14 @@ category: Generic build-type: Simple extra-source-files: CHANGELOG.md-cabal-version: >=1.22+cabal-version: 1.22 tested-with: GHC == 7.10.3 , GHC == 8.0.2 , GHC == 8.2.2 , GHC == 8.4.1 , GHC == 8.6.5 , GHC == 8.10.1+ , GHC == 9.0.2 library exposed-modules: Test.QuickCheck.Arbitrary.Generic
src/Test/QuickCheck/Arbitrary/Generic.hs view
@@ -1,4 +1,4 @@-{-# LANGUAGE UndecidableInstances, TypeOperators, DataKinds, TypeFamilies, ScopedTypeVariables#-}+{-# LANGUAGE FlexibleContexts, UndecidableInstances, TypeOperators, DataKinds, TypeFamilies, ScopedTypeVariables#-} {- | @@ -82,8 +82,8 @@ instance (GArbitrary a, GArbitrary b, KnownNat (SumLen a), KnownNat (SumLen b) ) => GArbitrary (a G.:+: b) where gArbitrary = frequency- [ (lfreq, G.L1 <$> gArbitrary)- , (rfreq, G.R1 <$> gArbitrary) ]+ [ (lfreq, G.L1 <$> QC.scale pred gArbitrary)+ , (rfreq, G.R1 <$> QC.scale pred gArbitrary) ] where lfreq = fromIntegral $ natVal (Proxy :: Proxy (SumLen a)) rfreq = fromIntegral $ natVal (Proxy :: Proxy (SumLen b))