smallcheck 1.2.1.1 → 1.2.2
raw patch · 10 files changed
+184/−163 lines, 10 filesdep −ghc-primdep −natsdep −semigroupsdep ~basesetup-changedPVP: major bump suggested
API removals or changes: PVP suggests a major version bump
Dependencies removed: ghc-prim, nats, semigroups, transformers, void
Dependency ranges changed: base
API changes (from Hackage documentation)
- Test.SmallCheck.Series: instance GHC.Base.Monad m => Test.SmallCheck.Series.CoSerial m Data.Void.Void
- Test.SmallCheck.Series: instance GHC.Base.Monad m => Test.SmallCheck.Series.Serial m Data.Void.Void
+ Test.SmallCheck.Series: ($dmcoseries) :: (CoSerial m a, Generic a, GCoSerial m (Rep a)) => Series m b -> Series m (a -> b)
+ Test.SmallCheck.Series: ($dmseries) :: (Serial m a, Generic a, GSerial m (Rep a)) => Series m a
+ Test.SmallCheck.Series: instance (GHC.Base.Monad m, Test.SmallCheck.Series.CoSerial m a) => Test.SmallCheck.Series.CoSerial m (Control.Applicative.ZipList a)
+ Test.SmallCheck.Series: instance (GHC.Base.Monad m, Test.SmallCheck.Series.CoSerial m a) => Test.SmallCheck.Series.CoSerial m (Data.Functor.Identity.Identity a)
+ Test.SmallCheck.Series: instance (GHC.Base.Monad m, Test.SmallCheck.Series.CoSerial m a) => Test.SmallCheck.Series.CoSerial m (Data.Monoid.First a)
+ Test.SmallCheck.Series: instance (GHC.Base.Monad m, Test.SmallCheck.Series.CoSerial m a) => Test.SmallCheck.Series.CoSerial m (Data.Monoid.Last a)
+ Test.SmallCheck.Series: instance (GHC.Base.Monad m, Test.SmallCheck.Series.CoSerial m a) => Test.SmallCheck.Series.CoSerial m (Data.Ord.Down a)
+ Test.SmallCheck.Series: instance (GHC.Base.Monad m, Test.SmallCheck.Series.CoSerial m a) => Test.SmallCheck.Series.CoSerial m (Data.Semigroup.First a)
+ Test.SmallCheck.Series: instance (GHC.Base.Monad m, Test.SmallCheck.Series.CoSerial m a) => Test.SmallCheck.Series.CoSerial m (Data.Semigroup.Internal.Dual a)
+ Test.SmallCheck.Series: instance (GHC.Base.Monad m, Test.SmallCheck.Series.CoSerial m a) => Test.SmallCheck.Series.CoSerial m (Data.Semigroup.Internal.Product a)
+ Test.SmallCheck.Series: instance (GHC.Base.Monad m, Test.SmallCheck.Series.CoSerial m a) => Test.SmallCheck.Series.CoSerial m (Data.Semigroup.Internal.Sum a)
+ Test.SmallCheck.Series: instance (GHC.Base.Monad m, Test.SmallCheck.Series.CoSerial m a) => Test.SmallCheck.Series.CoSerial m (Data.Semigroup.Last a)
+ Test.SmallCheck.Series: instance (GHC.Base.Monad m, Test.SmallCheck.Series.CoSerial m a) => Test.SmallCheck.Series.CoSerial m (Data.Semigroup.Max a)
+ Test.SmallCheck.Series: instance (GHC.Base.Monad m, Test.SmallCheck.Series.CoSerial m a) => Test.SmallCheck.Series.CoSerial m (Data.Semigroup.Min a)
+ Test.SmallCheck.Series: instance (GHC.Base.Monad m, Test.SmallCheck.Series.CoSerial m a) => Test.SmallCheck.Series.CoSerial m (Data.Semigroup.WrappedMonoid a)
+ Test.SmallCheck.Series: instance (GHC.Base.Monad m, Test.SmallCheck.Series.CoSerial m a) => Test.SmallCheck.Series.CoSerial m (GHC.Tuple.Prim.Solo a)
+ Test.SmallCheck.Series: instance (GHC.Base.Monad m, Test.SmallCheck.Series.Serial m a) => Test.SmallCheck.Series.Serial m (Control.Applicative.ZipList a)
+ Test.SmallCheck.Series: instance (GHC.Base.Monad m, Test.SmallCheck.Series.Serial m a) => Test.SmallCheck.Series.Serial m (Data.Functor.Identity.Identity a)
+ Test.SmallCheck.Series: instance (GHC.Base.Monad m, Test.SmallCheck.Series.Serial m a) => Test.SmallCheck.Series.Serial m (Data.Monoid.First a)
+ Test.SmallCheck.Series: instance (GHC.Base.Monad m, Test.SmallCheck.Series.Serial m a) => Test.SmallCheck.Series.Serial m (Data.Monoid.Last a)
+ Test.SmallCheck.Series: instance (GHC.Base.Monad m, Test.SmallCheck.Series.Serial m a) => Test.SmallCheck.Series.Serial m (Data.Ord.Down a)
+ Test.SmallCheck.Series: instance (GHC.Base.Monad m, Test.SmallCheck.Series.Serial m a) => Test.SmallCheck.Series.Serial m (Data.Semigroup.First a)
+ Test.SmallCheck.Series: instance (GHC.Base.Monad m, Test.SmallCheck.Series.Serial m a) => Test.SmallCheck.Series.Serial m (Data.Semigroup.Internal.Dual a)
+ Test.SmallCheck.Series: instance (GHC.Base.Monad m, Test.SmallCheck.Series.Serial m a) => Test.SmallCheck.Series.Serial m (Data.Semigroup.Internal.Product a)
+ Test.SmallCheck.Series: instance (GHC.Base.Monad m, Test.SmallCheck.Series.Serial m a) => Test.SmallCheck.Series.Serial m (Data.Semigroup.Internal.Sum a)
+ Test.SmallCheck.Series: instance (GHC.Base.Monad m, Test.SmallCheck.Series.Serial m a) => Test.SmallCheck.Series.Serial m (Data.Semigroup.Last a)
+ Test.SmallCheck.Series: instance (GHC.Base.Monad m, Test.SmallCheck.Series.Serial m a) => Test.SmallCheck.Series.Serial m (Data.Semigroup.Max a)
+ Test.SmallCheck.Series: instance (GHC.Base.Monad m, Test.SmallCheck.Series.Serial m a) => Test.SmallCheck.Series.Serial m (Data.Semigroup.Min a)
+ Test.SmallCheck.Series: instance (GHC.Base.Monad m, Test.SmallCheck.Series.Serial m a) => Test.SmallCheck.Series.Serial m (Data.Semigroup.WrappedMonoid a)
+ Test.SmallCheck.Series: instance (GHC.Base.Monad m, Test.SmallCheck.Series.Serial m a) => Test.SmallCheck.Series.Serial m (GHC.Tuple.Prim.Solo a)
+ Test.SmallCheck.Series: instance GHC.Base.Monad m => Test.SmallCheck.Series.CoSerial m Data.Semigroup.Internal.All
+ Test.SmallCheck.Series: instance GHC.Base.Monad m => Test.SmallCheck.Series.CoSerial m Data.Semigroup.Internal.Any
+ Test.SmallCheck.Series: instance GHC.Base.Monad m => Test.SmallCheck.Series.CoSerial m GHC.Base.Void
+ Test.SmallCheck.Series: instance GHC.Base.Monad m => Test.SmallCheck.Series.Serial m Data.Semigroup.Internal.All
+ Test.SmallCheck.Series: instance GHC.Base.Monad m => Test.SmallCheck.Series.Serial m Data.Semigroup.Internal.Any
+ Test.SmallCheck.Series: instance GHC.Base.Monad m => Test.SmallCheck.Series.Serial m GHC.Base.Void
- Test.SmallCheck: (==>) :: (Testable m c, Testable m a) => c -> a -> Property m
+ Test.SmallCheck: (==>) :: forall (m :: Type -> Type) c a. (Testable m c, Testable m a) => c -> a -> Property m
- Test.SmallCheck: changeDepth :: Testable m a => (Depth -> Depth) -> a -> Property m
+ Test.SmallCheck: changeDepth :: forall (m :: Type -> Type) a. Testable m a => (Depth -> Depth) -> a -> Property m
- Test.SmallCheck: changeDepth1 :: (Show a, Serial m a, Testable m b) => (Depth -> Depth) -> (a -> b) -> Property m
+ Test.SmallCheck: changeDepth1 :: forall a (m :: Type -> Type) b. (Show a, Serial m a, Testable m b) => (Depth -> Depth) -> (a -> b) -> Property m
- Test.SmallCheck: class Monad m => Testable m a
+ Test.SmallCheck: class Monad m => Testable (m :: Type -> Type) a
- Test.SmallCheck: data Property m
+ Test.SmallCheck: data Property (m :: Type -> Type)
- Test.SmallCheck: exists :: Testable m a => a -> Property m
+ Test.SmallCheck: exists :: forall (m :: Type -> Type) a. Testable m a => a -> Property m
- Test.SmallCheck: existsUnique :: Testable m a => a -> Property m
+ Test.SmallCheck: existsUnique :: forall (m :: Type -> Type) a. Testable m a => a -> Property m
- Test.SmallCheck: forAll :: Testable m a => a -> Property m
+ Test.SmallCheck: forAll :: forall (m :: Type -> Type) a. Testable m a => a -> Property m
- Test.SmallCheck: over :: (Show a, Testable m b) => Series m a -> (a -> b) -> Property m
+ Test.SmallCheck: over :: forall a (m :: Type -> Type) b. (Show a, Testable m b) => Series m a -> (a -> b) -> Property m
- Test.SmallCheck.Series: (<~>) :: Monad m => Series m (a -> b) -> Series m a -> Series m b
+ Test.SmallCheck.Series: (<~>) :: forall (m :: Type -> Type) a b. Monad m => Series m (a -> b) -> Series m a -> Series m b
- Test.SmallCheck.Series: (><) :: Monad m => Series m a -> Series m b -> Series m (a, b)
+ Test.SmallCheck.Series: (><) :: forall (m :: Type -> Type) a b. Monad m => Series m a -> Series m b -> Series m (a, b)
- Test.SmallCheck.Series: (\/) :: Monad m => Series m a -> Series m a -> Series m a
+ Test.SmallCheck.Series: (\/) :: forall (m :: Type -> Type) a. Monad m => Series m a -> Series m a -> Series m a
- Test.SmallCheck.Series: alts0 :: Series m a -> Series m a
+ Test.SmallCheck.Series: alts0 :: forall (m :: Type -> Type) a. Series m a -> Series m a
- Test.SmallCheck.Series: alts1 :: CoSerial m a => Series m b -> Series m (a -> b)
+ Test.SmallCheck.Series: alts1 :: forall (m :: Type -> Type) a b. CoSerial m a => Series m b -> Series m (a -> b)
- Test.SmallCheck.Series: alts2 :: (CoSerial m a, CoSerial m b) => Series m c -> Series m (a -> b -> c)
+ Test.SmallCheck.Series: alts2 :: forall (m :: Type -> Type) a b c. (CoSerial m a, CoSerial m b) => Series m c -> Series m (a -> b -> c)
- Test.SmallCheck.Series: alts3 :: (CoSerial m a, CoSerial m b, CoSerial m c) => Series m d -> Series m (a -> b -> c -> d)
+ Test.SmallCheck.Series: alts3 :: forall (m :: Type -> Type) a b c d. (CoSerial m a, CoSerial m b, CoSerial m c) => Series m d -> Series m (a -> b -> c -> d)
- Test.SmallCheck.Series: alts4 :: (CoSerial m a, CoSerial m b, CoSerial m c, CoSerial m d) => Series m e -> Series m (a -> b -> c -> d -> e)
+ Test.SmallCheck.Series: alts4 :: forall (m :: Type -> Type) a b c d e. (CoSerial m a, CoSerial m b, CoSerial m c, CoSerial m d) => Series m e -> Series m (a -> b -> c -> d -> e)
- Test.SmallCheck.Series: alts5 :: (CoSerial m a, CoSerial m b, CoSerial m c, CoSerial m d, CoSerial m e) => Series m f -> Series m (a -> b -> c -> d -> e -> f)
+ Test.SmallCheck.Series: alts5 :: forall (m :: Type -> Type) a b c d e f. (CoSerial m a, CoSerial m b, CoSerial m c, CoSerial m d, CoSerial m e) => Series m f -> Series m (a -> b -> c -> d -> e -> f)
- Test.SmallCheck.Series: alts6 :: (CoSerial m a, CoSerial m b, CoSerial m c, CoSerial m d, CoSerial m e, CoSerial m f) => Series m g -> Series m (a -> b -> c -> d -> e -> f -> g)
+ Test.SmallCheck.Series: alts6 :: forall (m :: Type -> Type) a b c d e f g. (CoSerial m a, CoSerial m b, CoSerial m c, CoSerial m d, CoSerial m e, CoSerial m f) => Series m g -> Series m (a -> b -> c -> d -> e -> f -> g)
- Test.SmallCheck.Series: class Monad m => CoSerial m a
+ Test.SmallCheck.Series: class Monad m => CoSerial (m :: Type -> Type) a
- Test.SmallCheck.Series: class Monad m => Serial m a
+ Test.SmallCheck.Series: class Monad m => Serial (m :: Type -> Type) a
- Test.SmallCheck.Series: cons0 :: a -> Series m a
+ Test.SmallCheck.Series: cons0 :: forall a (m :: Type -> Type). a -> Series m a
- Test.SmallCheck.Series: cons1 :: Serial m a => (a -> b) -> Series m b
+ Test.SmallCheck.Series: cons1 :: forall (m :: Type -> Type) a b. Serial m a => (a -> b) -> Series m b
- Test.SmallCheck.Series: cons2 :: (Serial m a, Serial m b) => (a -> b -> c) -> Series m c
+ Test.SmallCheck.Series: cons2 :: forall (m :: Type -> Type) a b c. (Serial m a, Serial m b) => (a -> b -> c) -> Series m c
- Test.SmallCheck.Series: cons3 :: (Serial m a, Serial m b, Serial m c) => (a -> b -> c -> d) -> Series m d
+ Test.SmallCheck.Series: cons3 :: forall (m :: Type -> Type) a b c d. (Serial m a, Serial m b, Serial m c) => (a -> b -> c -> d) -> Series m d
- Test.SmallCheck.Series: cons4 :: (Serial m a, Serial m b, Serial m c, Serial m d) => (a -> b -> c -> d -> e) -> Series m e
+ Test.SmallCheck.Series: cons4 :: forall (m :: Type -> Type) a b c d e. (Serial m a, Serial m b, Serial m c, Serial m d) => (a -> b -> c -> d -> e) -> Series m e
- Test.SmallCheck.Series: cons5 :: (Serial m a, Serial m b, Serial m c, Serial m d, Serial m e) => (a -> b -> c -> d -> e -> f) -> Series m f
+ Test.SmallCheck.Series: cons5 :: forall (m :: Type -> Type) a b c d e f. (Serial m a, Serial m b, Serial m c, Serial m d, Serial m e) => (a -> b -> c -> d -> e -> f) -> Series m f
- Test.SmallCheck.Series: cons6 :: (Serial m a, Serial m b, Serial m c, Serial m d, Serial m e, Serial m f) => (a -> b -> c -> d -> e -> f -> g) -> Series m g
+ Test.SmallCheck.Series: cons6 :: forall (m :: Type -> Type) a b c d e f g. (Serial m a, Serial m b, Serial m c, Serial m d, Serial m e, Serial m f) => (a -> b -> c -> d -> e -> f -> g) -> Series m g
- Test.SmallCheck.Series: coseries :: (CoSerial m a, Generic a, GCoSerial m (Rep a)) => Series m b -> Series m (a -> b)
+ Test.SmallCheck.Series: coseries :: CoSerial m a => Series m b -> Series m (a -> b)
- Test.SmallCheck.Series: data Series m a
+ Test.SmallCheck.Series: data Series (m :: Type -> Type) a
- Test.SmallCheck.Series: decDepth :: Series m a -> Series m a
+ Test.SmallCheck.Series: decDepth :: forall (m :: Type -> Type) a. Series m a -> Series m a
- Test.SmallCheck.Series: decDepthChecked :: Series m a -> Series m a -> Series m a
+ Test.SmallCheck.Series: decDepthChecked :: forall (m :: Type -> Type) a. Series m a -> Series m a -> Series m a
- Test.SmallCheck.Series: fixDepth :: Series m a -> Series m (Series m a)
+ Test.SmallCheck.Series: fixDepth :: forall (m :: Type -> Type) a. Series m a -> Series m (Series m a)
- Test.SmallCheck.Series: generate :: (Depth -> [a]) -> Series m a
+ Test.SmallCheck.Series: generate :: forall a (m :: Type -> Type). (Depth -> [a]) -> Series m a
- Test.SmallCheck.Series: genericCoseries :: (Monad m, Generic a, GCoSerial m (Rep a)) => Series m b -> Series m (a -> b)
+ Test.SmallCheck.Series: genericCoseries :: forall (m :: Type -> Type) a b. (Monad m, Generic a, GCoSerial m (Rep a)) => Series m b -> Series m (a -> b)
- Test.SmallCheck.Series: genericSeries :: (Monad m, Generic a, GSerial m (Rep a)) => Series m a
+ Test.SmallCheck.Series: genericSeries :: forall (m :: Type -> Type) a. (Monad m, Generic a, GSerial m (Rep a)) => Series m a
- Test.SmallCheck.Series: getDepth :: Series m Depth
+ Test.SmallCheck.Series: getDepth :: forall (m :: Type -> Type). Series m Depth
- Test.SmallCheck.Series: limit :: forall m a. Monad m => Int -> Series m a -> Series m a
+ Test.SmallCheck.Series: limit :: forall (m :: Type -> Type) a. Monad m => Int -> Series m a -> Series m a
- Test.SmallCheck.Series: localDepth :: (Depth -> Depth) -> Series m a -> Series m a
+ Test.SmallCheck.Series: localDepth :: forall (m :: Type -> Type) a. (Depth -> Depth) -> Series m a -> Series m a
- Test.SmallCheck.Series: newtypeAlts :: CoSerial m a => Series m b -> Series m (a -> b)
+ Test.SmallCheck.Series: newtypeAlts :: forall (m :: Type -> Type) a b. CoSerial m a => Series m b -> Series m (a -> b)
- Test.SmallCheck.Series: newtypeCons :: Serial m a => (a -> b) -> Series m b
+ Test.SmallCheck.Series: newtypeCons :: forall (m :: Type -> Type) a b. Serial m a => (a -> b) -> Series m b
- Test.SmallCheck.Series: series :: (Serial m a, Generic a, GSerial m (Rep a)) => Series m a
+ Test.SmallCheck.Series: series :: Serial m a => Series m a
Files
- CHANGELOG.md +6/−0
- README.md +3/−1
- Setup.hs +0/−2
- Test/SmallCheck.hs +0/−2
- Test/SmallCheck/Drivers.hs +0/−2
- Test/SmallCheck/Property.hs +0/−37
- Test/SmallCheck/Property/Result.hs +0/−2
- Test/SmallCheck/Series.hs +169/−93
- Test/SmallCheck/SeriesMonad.hs +0/−2
- smallcheck.cabal +6/−22
CHANGELOG.md view
@@ -1,6 +1,12 @@ Changes ======= +Version 1.2.2+-------------++* Add `Serial` and `CoSerial` instances for various newtypes from `base`:+ `Identity`, `Solo`, `ZipList`, `Down`, `First`, `Last`, `All`, `Any`, `Min`, `Max`, `Dual`, `Product`, `Sum`, `WrappedMonoid`.+ Version 1.2.1.1 -------------
README.md view
@@ -18,5 +18,7 @@ The big difference is that instead of using a sample of randomly generated values, SmallCheck tests properties for all the finitely many values up to some depth, progressively increasing the depth used. For data values, depth means depth of construction. For functional values, it is a measure combining the depth to which arguments may be evaluated and the depth of possible results. -The package is based on the [paper](http://www.cs.york.ac.uk/fp/smallcheck/smallcheck.pdf)+The package is based on the [paper](https://dl.acm.org/doi/epdf/10.1145/1411286.1411292) by Colin Runciman, Matthew Naylor and Fredrik Lindblad.++See the [blog post](https://ro-che.info/articles/2018-05-25-quickcheck-vs-smallcheck) by Roman Cheplyaka for the detailed comparison to QuickCheck.
− Setup.hs
@@ -1,2 +0,0 @@-import Distribution.Simple-main = defaultMain
Test/SmallCheck.hs view
@@ -17,9 +17,7 @@ {-# LANGUAGE CPP #-} {-# LANGUAGE NoImplicitPrelude #-}-#if __GLASGOW_HASKELL__ >= 704 {-# LANGUAGE Safe #-}-#endif module Test.SmallCheck ( -- * Constructing tests
Test/SmallCheck/Drivers.hs view
@@ -12,9 +12,7 @@ {-# LANGUAGE CPP #-} {-# LANGUAGE FlexibleContexts #-} {-# LANGUAGE NoImplicitPrelude #-}-#if __GLASGOW_HASKELL__ >= 704 {-# LANGUAGE Safe #-}-#endif module Test.SmallCheck.Drivers ( smallCheck, smallCheckM, smallCheckWithHook,
Test/SmallCheck/Property.hs view
@@ -19,17 +19,7 @@ {-# LANGUAGE TypeFamilies #-} {-# LANGUAGE TypeOperators #-} --- Are we using new, polykinded and derivable Typeable yet?-#define NEWTYPEABLE MIN_VERSION_base(4,7,0)--#if NEWTYPEABLE {-# LANGUAGE Safe #-}-#else--- Trustworthy is needed because of the hand-written Typeable instance-#if __GLASGOW_HASKELL__ >= 704-{-# LANGUAGE Trustworthy #-}-#endif-#endif module Test.SmallCheck.Property ( -- * Constructors@@ -65,16 +55,6 @@ import Data.Type.Equality (type (~)) #endif -#if !NEWTYPEABLE-import Data.Typeable (Typeable1, mkTyConApp, typeOf)-import Prelude (undefined)-#if MIN_VERSION_base(4,4,0)-import Data.Typeable (mkTyCon3)-#else-import Data.Typeable (mkTyCon)-#endif-#endif- ------------------------------ -- Property-related types ------------------------------@@ -84,9 +64,7 @@ -- -- @since 1.0 newtype Property m = Property { unProperty :: Reader (Env m) (PropertySeries m) }-#if NEWTYPEABLE deriving Typeable-#endif data PropertySeries m = PropertySeries@@ -111,21 +89,6 @@ = GoodTest | BadTest deriving (Eq, Ord, Enum, Show)--#if !NEWTYPEABLE--- Typeable here is not polykinded yet, and also GHC doesn't know how to--- derive this.-instance Typeable1 m => Typeable (Property m)- where- typeOf _ =- mkTyConApp-#if MIN_VERSION_base(4,4,0)- (mkTyCon3 "smallcheck" "Test.SmallCheck.Property" "Property")-#else- (mkTyCon "smallcheck Test.SmallCheck.Property Property")-#endif- [typeOf (undefined :: m ())]-#endif -- }}}
Test/SmallCheck/Property/Result.hs view
@@ -1,9 +1,7 @@ {-# LANGUAGE CPP #-} {-# LANGUAGE FlexibleInstances #-} {-# LANGUAGE NoImplicitPrelude #-}-#if __GLASGOW_HASKELL__ >= 704 {-# LANGUAGE Safe #-}-#endif module Test.SmallCheck.Property.Result ( PropertySuccess(..)
Test/SmallCheck/Series.hs view
@@ -24,31 +24,18 @@ -------------------------------------------------------------------- {-# LANGUAGE CPP #-}-#if __GLASGOW_HASKELL__ >= 702 {-# LANGUAGE DefaultSignatures #-}-#endif-{-# LANGUAGE DeriveFoldable #-}-{-# LANGUAGE DeriveFunctor #-} {-# LANGUAGE DeriveTraversable #-} {-# LANGUAGE FlexibleContexts #-} {-# LANGUAGE FlexibleInstances #-}+{-# LANGUAGE LambdaCase #-} {-# LANGUAGE MultiParamTypeClasses #-} {-# LANGUAGE NoImplicitPrelude #-} {-# LANGUAGE RankNTypes #-}+{-# LANGUAGE Safe #-} {-# LANGUAGE ScopedTypeVariables #-} {-# LANGUAGE TypeOperators #-} -#if MIN_VERSION_base(4,8,0)-{-# LANGUAGE Safe #-}-#else-{-# LANGUAGE OverlappingInstances #-}-#if __GLASGOW_HASKELL__ >= 704-{-# LANGUAGE Trustworthy #-}-#endif-#endif--#define HASCBOOL MIN_VERSION_base(4,10,0)- module Test.SmallCheck.Series ( -- {{{ -- * Generic instances@@ -184,11 +171,9 @@ -- * Basic definitions Depth, Series, Serial(..), CoSerial(..), -#if __GLASGOW_HASKELL__ >= 702 -- * Generic implementations genericSeries, genericCoseries,-#endif -- * Convenient wrappers Positive(..), NonNegative(..), NonZero(..), NonEmpty(..),@@ -209,7 +194,7 @@ -- }}} ) where -import Control.Applicative (empty, pure, (<$>), (<|>))+import Control.Applicative (empty, pure, (<$>), (<|>), ZipList(ZipList)) import Control.Monad (Monad, liftM, guard, mzero, mplus, msum, return, (>>), (>>=)) import Control.Monad.Identity (Identity(Identity), runIdentity) import Control.Monad.Logic (MonadLogic, (>>-), interleave, msplit, observeAllT)@@ -227,8 +212,10 @@ import Data.List (intercalate, take, map, length, (++), maximum, sum, unlines, lines, concat) import qualified Data.List.NonEmpty as NE import Data.Maybe (Maybe (Just, Nothing), maybe)-import Data.Ord (Ord, Ordering (LT, EQ, GT), max, (<), (>), (>=), compare, (<=))+import qualified Data.Monoid as Monoid+import Data.Ord (Ord, Ordering (LT, EQ, GT), max, (<), (>), (>=), compare, (<=), Down(Down)) import Data.Ratio (Ratio, numerator, denominator, (%))+import qualified Data.Semigroup as Semigroup import Data.Traversable (Traversable) import Data.Tuple (uncurry) import Data.Void (Void, absurd)@@ -237,18 +224,11 @@ import Prelude (Integer, Real, toRational, Enum, toEnum, fromEnum, Num, (+), (*), Integral, quotRem, toInteger, negate, abs, signum, fromInteger, Bounded, minBound, maxBound, Float, Double, (-), odd, encodeFloat, decodeFloat, realToFrac, seq, subtract) import Test.SmallCheck.SeriesMonad import Text.Show (Show, showsPrec, show)--#if MIN_VERSION_base(4,5,0)-import Foreign.C.Types (CFloat(CFloat), CDouble(CDouble), CChar(CChar), CSChar(CSChar), CUChar(CUChar), CShort(CShort), CUShort(CUShort), CInt(CInt), CUInt(CUInt), CLong(CLong), CULong(CULong), CPtrdiff(CPtrdiff), CSize(CSize), CWchar(CWchar), CSigAtomic(CSigAtomic), CLLong(CLLong), CULLong(CULLong), CIntPtr(CIntPtr), CUIntPtr(CUIntPtr), CIntMax(CIntMax), CUIntMax(CUIntMax), CClock(CClock), CTime(CTime), CUSeconds(CUSeconds), CSUSeconds(CSUSeconds))-#endif--#if __GLASGOW_HASKELL__ >= 702+import Foreign.C.Types (CFloat(CFloat), CDouble(CDouble), CChar(CChar), CSChar(CSChar), CUChar(CUChar), CShort(CShort), CUShort(CUShort), CInt(CInt), CUInt(CUInt), CLong(CLong), CULong(CULong), CPtrdiff(CPtrdiff), CSize(CSize), CWchar(CWchar), CSigAtomic(CSigAtomic), CLLong(CLLong), CULLong(CULLong), CIntPtr(CIntPtr), CUIntPtr(CUIntPtr), CIntMax(CIntMax), CUIntMax(CUIntMax), CClock(CClock), CTime(CTime), CUSeconds(CUSeconds), CSUSeconds(CSUSeconds), CBool(CBool)) import GHC.Generics (Generic, (:+:)(L1, R1), (:*:)((:*:)), C1, K1(K1), unK1, M1(M1), unM1, U1(U1), V1, Rep, to, from)-#else-import Prelude (RealFloat)-#endif-#if HASCBOOL-import Foreign.C.Types (CBool(CBool))++#if MIN_VERSION_base(4,18,0)+import Data.Tuple (Solo(MkSolo)) #endif ------------------------------@@ -260,18 +240,14 @@ class Monad m => Serial m a where series :: Series m a -#if __GLASGOW_HASKELL__ >= 704 default series :: (Generic a, GSerial m (Rep a)) => Series m a series = genericSeries-#endif -#if __GLASGOW_HASKELL__ >= 702 -- | @since 1.1.5 genericSeries :: (Monad m, Generic a, GSerial m (Rep a)) => Series m a genericSeries = to <$> gSeries-#endif -- | @since 1.0 class Monad m => CoSerial m a where@@ -280,18 +256,14 @@ -- functions non-uniform in their arguments. coseries :: Series m b -> Series m (a->b) -#if __GLASGOW_HASKELL__ >= 704 default coseries :: (Generic a, GCoSerial m (Rep a)) => Series m b -> Series m (a->b) coseries = genericCoseries-#endif -#if __GLASGOW_HASKELL__ >= 702 -- | @since 1.1.5 genericCoseries :: (Monad m, Generic a, GCoSerial m (Rep a)) => Series m b -> Series m (a->b) genericCoseries rs = (. from) <$> gCoseries rs-#endif -- }}} @@ -421,7 +393,7 @@ -- -- @since 1.1.1 constM :: Monad m => m b -> m (a -> b)-constM = liftM const+constM = fmap const -- | Fix the depth of a series at the current level. The resulting series -- will no longer depend on the \"ambient\" depth.@@ -444,7 +416,7 @@ unwind :: MonadLogic m => m a -> m [a] unwind a = msplit a >>=- maybe (return []) (\(x,a') -> (x:) `liftM` unwind a')+ maybe (return []) (\(x,a') -> (x:) <$> unwind a') -- }}} @@ -583,7 +555,6 @@ class GCoSerial m f where gCoseries :: Series m b -> Series m (f a -> b) -#if __GLASGOW_HASKELL__ >= 702 instance {-# OVERLAPPABLE #-} GSerial m f => GSerial m (M1 i c f) where gSeries = M1 <$> gSeries {-# INLINE gSeries #-}@@ -602,7 +573,7 @@ gSeries = pure U1 {-# INLINE gSeries #-} instance GCoSerial m U1 where- gCoseries rs = constM rs+ gCoseries = constM {-# INLINE gCoseries #-} instance GSerial m V1 where@@ -629,7 +600,7 @@ gCoseries rs >>- \f -> gCoseries rs >>- \g -> return $- \e -> case e of+ \case L1 x -> f x R1 y -> g y {-# INLINE gCoseries #-}@@ -637,7 +608,6 @@ instance {-# OVERLAPPING #-} GSerial m f => GSerial m (C1 c f) where gSeries = M1 <$> decDepth gSeries {-# INLINE gSeries #-}-#endif -- }}} @@ -648,7 +618,7 @@ instance Monad m => Serial m () where series = return () instance Monad m => CoSerial m () where- coseries rs = constM rs+ coseries = constM instance Monad m => Serial m Integer where series = unM <$> series instance Monad m => CoSerial m Integer where coseries = fmap (. M) . coseries@@ -868,7 +838,7 @@ rs >>- \r1 -> rs >>- \r2 -> rs >>- \r3 ->- pure $ \x -> case x of+ pure $ \case LT -> r1 EQ -> r2 GT -> r3@@ -891,7 +861,7 @@ coseries rs = alts0 rs >>- \y -> alts2 rs >>- \f ->- return $ \xs -> case xs of [] -> y; x:xs' -> f x xs'+ return $ \case [] -> y; x:xs' -> f x xs' -- | @since 1.2.0 instance Serial m a => Serial m (NE.NonEmpty a) where@@ -903,22 +873,12 @@ alts2 rs >>- \f -> return $ \(x NE.:| xs') -> f x xs' -#if MIN_VERSION_base(4,4,0) -- | @since 1.2.0 instance Serial m a => Serial m (Complex a) where-#else--- | @since 1.2.0-instance (RealFloat a, Serial m a) => Serial m (Complex a) where-#endif series = cons2 (:+) -#if MIN_VERSION_base(4,4,0) -- | @since 1.2.0 instance CoSerial m a => CoSerial m (Complex a) where-#else--- | @since 1.2.0-instance (RealFloat a, CoSerial m a) => CoSerial m (Complex a) where-#endif coseries rs = alts2 rs >>- \f -> return $ \(x :+ xs') -> f x xs'@@ -945,13 +905,12 @@ where nest :: forall a b m c . (Serial m b, CoSerial m b) => Series m c -> [a] -> Series m ([b] -> c)- nest rs args = do- case args of- [] -> const `liftM` rs- _:rest -> do- let sf = coseries $ nest rs rest- f <- sf- return $ \(b:bs) -> f b bs+ nest rs args = case args of+ [] -> const <$> rs+ _:rest -> do+ let sf = coseries $ nest rs rest+ f <- sf+ return $ \(b:bs) -> f b bs -- show the extension of a function (in part, bounded both by -- the number and depth of arguments)@@ -1133,190 +1092,307 @@ ------------------------------ -- {{{ -#if MIN_VERSION_base(4,5,0) -- | @since 1.2.0 instance Monad m => Serial m CFloat where series = newtypeCons CFloat -- | @since 1.2.0 instance Monad m => CoSerial m CFloat where- coseries rs = newtypeAlts rs >>- \f -> return $ \l -> case l of CFloat x -> f x+ coseries rs = newtypeAlts rs >>- \f -> return $ \(CFloat x) -> f x -- | @since 1.2.0 instance Monad m => Serial m CDouble where series = newtypeCons CDouble -- | @since 1.2.0 instance Monad m => CoSerial m CDouble where- coseries rs = newtypeAlts rs >>- \f -> return $ \l -> case l of CDouble x -> f x+ coseries rs = newtypeAlts rs >>- \f -> return $ \(CDouble x) -> f x -#if HASCBOOL -- | @since 1.2.0 instance Monad m => Serial m CBool where series = newtypeCons CBool -- | @since 1.2.0 instance Monad m => CoSerial m CBool where- coseries rs = newtypeAlts rs >>- \f -> return $ \l -> case l of CBool x -> f x-#endif+ coseries rs = newtypeAlts rs >>- \f -> return $ \(CBool x) -> f x -- | @since 1.2.0 instance Monad m => Serial m CChar where series = newtypeCons CChar -- | @since 1.2.0 instance Monad m => CoSerial m CChar where- coseries rs = newtypeAlts rs >>- \f -> return $ \l -> case l of CChar x -> f x+ coseries rs = newtypeAlts rs >>- \f -> return $ \(CChar x) -> f x -- | @since 1.2.0 instance Monad m => Serial m CSChar where series = newtypeCons CSChar -- | @since 1.2.0 instance Monad m => CoSerial m CSChar where- coseries rs = newtypeAlts rs >>- \f -> return $ \l -> case l of CSChar x -> f x+ coseries rs = newtypeAlts rs >>- \f -> return $ \(CSChar x) -> f x -- | @since 1.2.0 instance Monad m => Serial m CUChar where series = newtypeCons CUChar -- | @since 1.2.0 instance Monad m => CoSerial m CUChar where- coseries rs = newtypeAlts rs >>- \f -> return $ \l -> case l of CUChar x -> f x+ coseries rs = newtypeAlts rs >>- \f -> return $ \(CUChar x) -> f x -- | @since 1.2.0 instance Monad m => Serial m CShort where series = newtypeCons CShort -- | @since 1.2.0 instance Monad m => CoSerial m CShort where- coseries rs = newtypeAlts rs >>- \f -> return $ \l -> case l of CShort x -> f x+ coseries rs = newtypeAlts rs >>- \f -> return $ \(CShort x) -> f x -- | @since 1.2.0 instance Monad m => Serial m CUShort where series = newtypeCons CUShort -- | @since 1.2.0 instance Monad m => CoSerial m CUShort where- coseries rs = newtypeAlts rs >>- \f -> return $ \l -> case l of CUShort x -> f x+ coseries rs = newtypeAlts rs >>- \f -> return $ \(CUShort x) -> f x -- | @since 1.2.0 instance Monad m => Serial m CInt where series = newtypeCons CInt -- | @since 1.2.0 instance Monad m => CoSerial m CInt where- coseries rs = newtypeAlts rs >>- \f -> return $ \l -> case l of CInt x -> f x+ coseries rs = newtypeAlts rs >>- \f -> return $ \(CInt x) -> f x -- | @since 1.2.0 instance Monad m => Serial m CUInt where series = newtypeCons CUInt -- | @since 1.2.0 instance Monad m => CoSerial m CUInt where- coseries rs = newtypeAlts rs >>- \f -> return $ \l -> case l of CUInt x -> f x+ coseries rs = newtypeAlts rs >>- \f -> return $ \(CUInt x) -> f x -- | @since 1.2.0 instance Monad m => Serial m CLong where series = newtypeCons CLong -- | @since 1.2.0 instance Monad m => CoSerial m CLong where- coseries rs = newtypeAlts rs >>- \f -> return $ \l -> case l of CLong x -> f x+ coseries rs = newtypeAlts rs >>- \f -> return $ \(CLong x) -> f x -- | @since 1.2.0 instance Monad m => Serial m CULong where series = newtypeCons CULong -- | @since 1.2.0 instance Monad m => CoSerial m CULong where- coseries rs = newtypeAlts rs >>- \f -> return $ \l -> case l of CULong x -> f x+ coseries rs = newtypeAlts rs >>- \f -> return $ \(CULong x) -> f x -- | @since 1.2.0 instance Monad m => Serial m CPtrdiff where series = newtypeCons CPtrdiff -- | @since 1.2.0 instance Monad m => CoSerial m CPtrdiff where- coseries rs = newtypeAlts rs >>- \f -> return $ \l -> case l of CPtrdiff x -> f x+ coseries rs = newtypeAlts rs >>- \f -> return $ \(CPtrdiff x) -> f x -- | @since 1.2.0 instance Monad m => Serial m CSize where series = newtypeCons CSize -- | @since 1.2.0 instance Monad m => CoSerial m CSize where- coseries rs = newtypeAlts rs >>- \f -> return $ \l -> case l of CSize x -> f x+ coseries rs = newtypeAlts rs >>- \f -> return $ \(CSize x) -> f x -- | @since 1.2.0 instance Monad m => Serial m CWchar where series = newtypeCons CWchar -- | @since 1.2.0 instance Monad m => CoSerial m CWchar where- coseries rs = newtypeAlts rs >>- \f -> return $ \l -> case l of CWchar x -> f x+ coseries rs = newtypeAlts rs >>- \f -> return $ \(CWchar x) -> f x -- | @since 1.2.0 instance Monad m => Serial m CSigAtomic where series = newtypeCons CSigAtomic -- | @since 1.2.0 instance Monad m => CoSerial m CSigAtomic where- coseries rs = newtypeAlts rs >>- \f -> return $ \l -> case l of CSigAtomic x -> f x+ coseries rs = newtypeAlts rs >>- \f -> return $ \(CSigAtomic x) -> f x -- | @since 1.2.0 instance Monad m => Serial m CLLong where series = newtypeCons CLLong -- | @since 1.2.0 instance Monad m => CoSerial m CLLong where- coseries rs = newtypeAlts rs >>- \f -> return $ \l -> case l of CLLong x -> f x+ coseries rs = newtypeAlts rs >>- \f -> return $ \(CLLong x) -> f x -- | @since 1.2.0 instance Monad m => Serial m CULLong where series = newtypeCons CULLong -- | @since 1.2.0 instance Monad m => CoSerial m CULLong where- coseries rs = newtypeAlts rs >>- \f -> return $ \l -> case l of CULLong x -> f x+ coseries rs = newtypeAlts rs >>- \f -> return $ \(CULLong x) -> f x -- | @since 1.2.0 instance Monad m => Serial m CIntPtr where series = newtypeCons CIntPtr -- | @since 1.2.0 instance Monad m => CoSerial m CIntPtr where- coseries rs = newtypeAlts rs >>- \f -> return $ \l -> case l of CIntPtr x -> f x+ coseries rs = newtypeAlts rs >>- \f -> return $ \(CIntPtr x) -> f x -- | @since 1.2.0 instance Monad m => Serial m CUIntPtr where series = newtypeCons CUIntPtr -- | @since 1.2.0 instance Monad m => CoSerial m CUIntPtr where- coseries rs = newtypeAlts rs >>- \f -> return $ \l -> case l of CUIntPtr x -> f x+ coseries rs = newtypeAlts rs >>- \f -> return $ \(CUIntPtr x) -> f x -- | @since 1.2.0 instance Monad m => Serial m CIntMax where series = newtypeCons CIntMax -- | @since 1.2.0 instance Monad m => CoSerial m CIntMax where- coseries rs = newtypeAlts rs >>- \f -> return $ \l -> case l of CIntMax x -> f x+ coseries rs = newtypeAlts rs >>- \f -> return $ \(CIntMax x) -> f x -- | @since 1.2.0 instance Monad m => Serial m CUIntMax where series = newtypeCons CUIntMax -- | @since 1.2.0 instance Monad m => CoSerial m CUIntMax where- coseries rs = newtypeAlts rs >>- \f -> return $ \l -> case l of CUIntMax x -> f x+ coseries rs = newtypeAlts rs >>- \f -> return $ \(CUIntMax x) -> f x -- | @since 1.2.0 instance Monad m => Serial m CClock where series = newtypeCons CClock -- | @since 1.2.0 instance Monad m => CoSerial m CClock where- coseries rs = newtypeAlts rs >>- \f -> return $ \l -> case l of CClock x -> f x+ coseries rs = newtypeAlts rs >>- \f -> return $ \(CClock x) -> f x -- | @since 1.2.0 instance Monad m => Serial m CTime where series = newtypeCons CTime -- | @since 1.2.0 instance Monad m => CoSerial m CTime where- coseries rs = newtypeAlts rs >>- \f -> return $ \l -> case l of CTime x -> f x+ coseries rs = newtypeAlts rs >>- \f -> return $ \(CTime x) -> f x -- | @since 1.2.0 instance Monad m => Serial m CUSeconds where series = newtypeCons CUSeconds -- | @since 1.2.0 instance Monad m => CoSerial m CUSeconds where- coseries rs = newtypeAlts rs >>- \f -> return $ \l -> case l of CUSeconds x -> f x+ coseries rs = newtypeAlts rs >>- \f -> return $ \(CUSeconds x) -> f x -- | @since 1.2.0 instance Monad m => Serial m CSUSeconds where series = newtypeCons CSUSeconds -- | @since 1.2.0 instance Monad m => CoSerial m CSUSeconds where- coseries rs = newtypeAlts rs >>- \f -> return $ \l -> case l of CSUSeconds x -> f x+ coseries rs = newtypeAlts rs >>- \f -> return $ \(CSUSeconds x) -> f x++-- }}}++------------------------------+-- Newtypes from base+------------------------------+-- {{{++-- | @since 1.2.2+instance (Monad m, Serial m a) => Serial m (Identity a) where+ series = newtypeCons Identity+-- | @since 1.2.2+instance (Monad m, CoSerial m a) => CoSerial m (Identity a) where+ coseries rs = newtypeAlts rs >>- \f -> return $ \(Identity x) -> f x++#if MIN_VERSION_base(4,18,0)+-- | @since 1.2.2+instance (Monad m, Serial m a) => Serial m (Solo a) where+ series = newtypeCons MkSolo+-- | @since 1.2.2+instance (Monad m, CoSerial m a) => CoSerial m (Solo a) where+ coseries rs = newtypeAlts rs >>- \f -> return $ \(MkSolo x) -> f x #endif++-- | @since 1.2.2+instance (Monad m, Serial m a) => Serial m (ZipList a) where+ series = newtypeCons ZipList+-- | @since 1.2.2+instance (Monad m, CoSerial m a) => CoSerial m (ZipList a) where+ coseries rs = newtypeAlts rs >>- \f -> return $ \(ZipList x) -> f x++-- | @since 1.2.2+instance (Monad m, Serial m a) => Serial m (Down a) where+ series = newtypeCons Down+-- | @since 1.2.2+instance (Monad m, CoSerial m a) => CoSerial m (Down a) where+ coseries rs = newtypeAlts rs >>- \f -> return $ \(Down x) -> f x++-- | @since 1.2.2+instance (Monad m, Serial m a) => Serial m (Monoid.First a) where+ series = newtypeCons Monoid.First+-- | @since 1.2.2+instance (Monad m, CoSerial m a) => CoSerial m (Monoid.First a) where+ coseries rs = newtypeAlts rs >>- \f -> return $ \(Monoid.First x) -> f x++-- | @since 1.2.2+instance (Monad m, Serial m a) => Serial m (Monoid.Last a) where+ series = newtypeCons Monoid.Last+-- | @since 1.2.2+instance (Monad m, CoSerial m a) => CoSerial m (Monoid.Last a) where+ coseries rs = newtypeAlts rs >>- \f -> return $ \(Monoid.Last x) -> f x++-- | @since 1.2.2+instance (Monad m, Serial m a) => Serial m (Semigroup.First a) where+ series = newtypeCons Semigroup.First+-- | @since 1.2.2+instance (Monad m, CoSerial m a) => CoSerial m (Semigroup.First a) where+ coseries rs = newtypeAlts rs >>- \f -> return $ \(Semigroup.First x) -> f x++-- | @since 1.2.2+instance (Monad m, Serial m a) => Serial m (Semigroup.Last a) where+ series = newtypeCons Semigroup.Last+-- | @since 1.2.2+instance (Monad m, CoSerial m a) => CoSerial m (Semigroup.Last a) where+ coseries rs = newtypeAlts rs >>- \f -> return $ \(Semigroup.Last x) -> f x++-- | @since 1.2.2+instance Monad m => Serial m Semigroup.All where+ series = newtypeCons Semigroup.All+-- | @since 1.2.2+instance Monad m => CoSerial m Semigroup.All where+ coseries rs = newtypeAlts rs >>- \f -> return $ \(Semigroup.All x) -> f x++-- | @since 1.2.2+instance Monad m => Serial m Semigroup.Any where+ series = newtypeCons Semigroup.Any+-- | @since 1.2.2+instance Monad m => CoSerial m Semigroup.Any where+ coseries rs = newtypeAlts rs >>- \f -> return $ \(Semigroup.Any x) -> f x++-- | @since 1.2.2+instance (Monad m, Serial m a) => Serial m (Semigroup.Max a) where+ series = newtypeCons Semigroup.Max+-- | @since 1.2.2+instance (Monad m, CoSerial m a) => CoSerial m (Semigroup.Max a) where+ coseries rs = newtypeAlts rs >>- \f -> return $ \(Semigroup.Max x) -> f x++-- | @since 1.2.2+instance (Monad m, Serial m a) => Serial m (Semigroup.Min a) where+ series = newtypeCons Semigroup.Min+-- | @since 1.2.2+instance (Monad m, CoSerial m a) => CoSerial m (Semigroup.Min a) where+ coseries rs = newtypeAlts rs >>- \f -> return $ \(Semigroup.Min x) -> f x++-- | @since 1.2.2+instance (Monad m, Serial m a) => Serial m (Semigroup.Dual a) where+ series = newtypeCons Semigroup.Dual+-- | @since 1.2.2+instance (Monad m, CoSerial m a) => CoSerial m (Semigroup.Dual a) where+ coseries rs = newtypeAlts rs >>- \f -> return $ \(Semigroup.Dual x) -> f x++-- | @since 1.2.2+instance (Monad m, Serial m a) => Serial m (Semigroup.Product a) where+ series = newtypeCons Semigroup.Product+-- | @since 1.2.2+instance (Monad m, CoSerial m a) => CoSerial m (Semigroup.Product a) where+ coseries rs = newtypeAlts rs >>- \f -> return $ \(Semigroup.Product x) -> f x++-- | @since 1.2.2+instance (Monad m, Serial m a) => Serial m (Semigroup.Sum a) where+ series = newtypeCons Semigroup.Sum+-- | @since 1.2.2+instance (Monad m, CoSerial m a) => CoSerial m (Semigroup.Sum a) where+ coseries rs = newtypeAlts rs >>- \f -> return $ \(Semigroup.Sum x) -> f x++-- | @since 1.2.2+instance (Monad m, Serial m a) => Serial m (Semigroup.WrappedMonoid a) where+ series = newtypeCons Semigroup.WrapMonoid+-- | @since 1.2.2+instance (Monad m, CoSerial m a) => CoSerial m (Semigroup.WrappedMonoid a) where+ coseries rs = newtypeAlts rs >>- \f -> return $ \(Semigroup.WrapMonoid x) -> f x -- }}}
Test/SmallCheck/SeriesMonad.hs view
@@ -1,8 +1,6 @@ {-# LANGUAGE CPP #-} {-# LANGUAGE NoImplicitPrelude #-}-#if __GLASGOW_HASKELL__ >= 704 {-# LANGUAGE Safe #-}-#endif module Test.SmallCheck.SeriesMonad where
smallcheck.cabal view
@@ -1,14 +1,13 @@ name: smallcheck-version: 1.2.1.1+version: 1.2.2 license: BSD3 license-file: LICENSE maintainer: Andrew Lelechenko <andrew.lelechenko@gmail.com> author: Colin Runciman, Roman Cheplyaka cabal-version: >=1.10 tested-with:- ghc ==9.6.1 ghc ==9.4.5- ghc ==9.2.7 ghc ==9.0.2 ghc ==8.10.7 ghc ==8.8.4 ghc ==8.6.5 ghc ==8.4.4 ghc ==8.2.2- ghc ==8.0.2 ghc ==7.10.3 ghc ==7.8.4 ghc ==7.6.3 ghc ==7.4.2 ghc ==7.2.2 ghc ==7.0.4+ ghc ==9.12.2 ghc ==9.10.2 ghc ==9.8.4 ghc ==9.6.7 ghc ==9.4.8+ ghc ==9.2.8 ghc ==9.0.2 ghc ==8.10.7 ghc ==8.8.4 ghc ==8.6.5 ghc ==8.4.4 ghc ==8.2.2 homepage: https://github.com/Bodigrim/smallcheck bug-reports: https://github.com/Bodigrim/smallcheck/issues@@ -31,7 +30,7 @@ source-repository head type: git- location: git://github.com/Bodigrim/smallcheck.git+ location: https://github.com/Bodigrim/smallcheck library default-language: Haskell2010@@ -47,24 +46,9 @@ Test.SmallCheck.Property.Result build-depends:- base >=4.3 && <5,+ base >=4.10 && <5, mtl <2.4, logict >=0.5 && <0.9, pretty <1.2 - if impl(ghc <8.0)- build-depends:- semigroups <0.21,- transformers <0.7-- if impl(ghc <7.10)- build-depends:- nats <1.2,- void <0.8-- if impl(ghc <7.6)- build-depends:- ghc-prim >=0.2 && <1-- if impl(ghc >= 8.0)- ghc-options: -Wcompat+ ghc-options: -Wcompat