-- Hoogle documentation, generated by Haddock
-- See Hoogle, http://www.haskell.org/hoogle/

-- | A property-based testing library
--   
--   As of 2023, this library is largely obsolete: arbitrary test
--   generators with shrinking such as falsify offer much better
--   user experience.
--   
--   SmallCheck is a testing library that allows to verify properties for
--   all test cases up to some depth. The test cases are generated
--   automatically by SmallCheck.
@package smallcheck
@version 1.2.1.1

-- | You need this module if you want to generate test values of your own
--   types.
--   
--   You'll typically need the following extensions:
--   
--   
--   {-# LANGUAGE FlexibleInstances, MultiParamTypeClasses #-}
--   
--   
--   SmallCheck itself defines data generators for all the data types used
--   by the Prelude.
--   
--   In order to generate values and functions of your own types, you need
--   to make them instances of Serial (for values) and
--   CoSerial (for functions). There are two main ways to do so:
--   using Generics or writing the instances by hand.
module Test.SmallCheck.Series

cons0 :: forall a (m :: Type -> Type). a -> Series m a

cons1 :: forall (m :: Type -> Type) a b. Serial m a => (a -> b) -> Series m b

cons2 :: forall (m :: Type -> Type) a b c. (Serial m a, Serial m b) => (a -> b -> c) -> Series m c

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

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

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

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

-- | Same as cons1, but preserves the depth.
newtypeCons :: forall (m :: Type -> Type) a b. Serial m a => (a -> b) -> Series m b

alts0 :: forall (m :: Type -> Type) a. Series m a -> Series m a

alts1 :: forall (m :: Type -> Type) a b. CoSerial m a => Series m b -> Series m (a -> b)

alts2 :: forall (m :: Type -> Type) a b c. (CoSerial m a, CoSerial m b) => Series m c -> Series m (a -> b -> c)

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)

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)

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)

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)

-- | Same as alts1, but preserves the depth.
newtypeAlts :: forall (m :: Type -> Type) a b. CoSerial m a => Series m b -> Series m (a -> b)

-- | Maximum depth of generated test values.
--   
--   For data values, it is the depth of nested constructor applications.
--   
--   For functional values, it is both the depth of nested case analysis
--   and the depth of results.
type Depth = Int

-- | Series is a MonadLogic action that enumerates values of
--   a certain type, up to some depth.
--   
--   The depth bound is tracked in the Series monad and can be
--   extracted using getDepth and changed using localDepth.
--   
--   To manipulate series at the lowest level you can use its Monad,
--   MonadPlus and MonadLogic instances. This module provides
--   some higher-level combinators which simplify creating series.
--   
--   A proper Series should be monotonic with respect to the depth —
--   i.e. localDepth (+1) s should emit all the
--   values that s emits (and possibly some more).
--   
--   It is also desirable that values of smaller depth come before the
--   values of greater depth.
data Series (m :: Type -> Type) a

class Monad m => Serial (m :: Type -> Type) a
series :: Serial m a => Series m a
($dmseries) :: (Serial m a, Generic a, GSerial m (Rep a)) => Series m a

class Monad m => CoSerial (m :: Type -> Type) a

-- | A proper coseries implementation should pass the depth
--   unchanged to its first argument. Doing otherwise will make enumeration
--   of curried functions non-uniform in their arguments.
coseries :: CoSerial m a => Series m b -> Series m (a -> b)
($dmcoseries) :: (CoSerial m a, Generic a, GCoSerial m (Rep a)) => Series m b -> Series m (a -> b)

genericSeries :: forall (m :: Type -> Type) a. (Monad m, Generic a, GSerial m (Rep a)) => Series m a

genericCoseries :: forall (m :: Type -> Type) a b. (Monad m, Generic a, GCoSerial m (Rep a)) => Series m b -> Series m (a -> b)

-- | Positive x guarantees that <math>.
newtype Positive a
Positive :: a -> Positive a
[getPositive] :: Positive a -> a

-- | NonNegative x guarantees that <math>.
newtype NonNegative a
NonNegative :: a -> NonNegative a
[getNonNegative] :: NonNegative a -> a

-- | NonZero x guarantees that <math>.
newtype NonZero a
NonZero :: a -> NonZero a
[getNonZero] :: NonZero a -> a

-- | NonEmpty xs guarantees that xs is not null.
newtype NonEmpty a
NonEmpty :: [a] -> NonEmpty a
[getNonEmpty] :: NonEmpty a -> [a]

-- | Sum (union) of series.
(\/) :: forall (m :: Type -> Type) a. Monad m => Series m a -> Series m a -> Series m a
infixr 7 \/

-- | Product of series
(><) :: forall (m :: Type -> Type) a b. Monad m => Series m a -> Series m b -> Series m (a, b)
infixr 8 ><

-- | Fair version of ap and <*>.
(<~>) :: forall (m :: Type -> Type) a b. Monad m => Series m (a -> b) -> Series m a -> Series m b
infixl 4 <~>

-- | Fair conjunction. Similarly to the previous function, consider
--   the distributivity law, naturally expected from MonadPlus:
--   
--   
--   (a <|> b) >>= k = (a >>= k) <|> (b >>= k)
--   
--   
--   If a >>= k can backtrack arbitrarily
--   many times, b >>= k may never be
--   considered. In logic statements, "backtracking" is the process of
--   discarding the current possible solution value and returning to a
--   previous decision point where a new value can be obtained and tried.
--   For example:
--   
--   
--   >>> do { x <- pure 0 <|> pure 1 <|> pure 2; if even x then pure x else empty } :: [Int]
--   [0,2]
--   
--   
--   Here, the x value can be produced three times, where
--   <|> represents the decision points of that production.
--   The subsequent if statement specifies empty (fail) if
--   x is odd, causing it to be discarded and a return to an
--   <|> decision point to get the next x.
--   
--   The statement "a >>= k can backtrack
--   arbitrarily many times" means that the computation is resulting in
--   empty and that a has an infinite number of
--   <|> applications to return to. This is called a
--   conjunctive computation because the logic for a and
--   k must both succeed (i.e. pure a value instead of
--   empty).
--   
--   Similar to the way interleave allows both branches of a
--   disjunctive computation, the >>- operator takes care to
--   consider both branches of a conjunctive computation.
--   
--   Consider the operation:
--   
--   
--   odds = pure 1 <|> fmap (2 +) odds
--   
--   oddsPlus n = odds >>= \a -> pure (a + n)
--   
--   g = do x <- (pure 0 <|> pure 1) >>= oddsPlus
--          if even x then pure x else empty
--   
--   
--   
--   >>> observeMany 3 g
--   ...never completes...
--   
--   
--   This will never produce any value because all values produced by the
--   do program come from the pure 1 driven
--   operation (adding one to the sequence of odd values, resulting in the
--   even values that are allowed by the test in the second line), but the
--   pure 0 input to oddsPlus generates an
--   infinite number of empty failures so the even values generated
--   by the pure 1 alternative are never seen. Using
--   interleave here instead of <|> does not help due
--   to the aforementioned distributivity law.
--   
--   Also note that the do notation desugars to >>=
--   bind operations, so the following would also fail:
--   
--   
--   do a <- pure 0 <|> pure 1
--      x <- oddsPlus a
--      if even x then pure x else empty
--   
--   
--   The solution is to use the >>- in place of the normal
--   monadic bind operation >>= when fairness between
--   alternative productions is needed in a conjunction of statements
--   (rules):
--   
--   
--   h = do x <- (pure 0 <|> pure 1) >>- oddsPlus
--          if even x then pure x else empty
--   
--   
--   
--   >>> observeMany 3 h
--   [2,4,6]
--   
--   
--   However, a bit of care is needed when using >>- because,
--   unlike >>=, it is not associative. For example:
--   
--   
--   >>> let m = [2,7] :: [Int]
--   
--   >>> let k x = [x, x + 1]
--   
--   >>> let h x = [x, x * 2]
--   
--   >>> m >>= (\x -> k x >>= h)
--   [2,4,3,6,7,14,8,16]
--   
--   >>> (m >>= k) >>= h -- same as above
--   [2,4,3,6,7,14,8,16]
--   
--   >>> m >>- (\x -> k x >>- h)
--   [2,7,3,8,4,14,6,16]
--   
--   >>> (m >>- k) >>- h -- central elements are different
--   [2,7,4,3,14,8,6,16]
--   
--   
--   This means that the following will be productive:
--   
--   
--   (pure 0 <|> pure 1) >>-
--     oddsPlus >>-
--       \x -> if even x then pure x else empty
--   
--   
--   Which is equivalent to
--   
--   
--   ((pure 0 <|> pure 1) >>- oddsPlus) >>-
--     (\x -> if even x then pure x else empty)
--   
--   
--   But the following will not be productive:
--   
--   
--   (pure 0 <|> pure 1) >>-
--     (\a -> (oddsPlus a >>- \x -> if even x then pure x else empty))
--   
--   
--   Since do notation desugaring results in the latter, the
--   RebindableSyntax or QualifiedDo language pragmas
--   cannot easily be used either. Instead, it is recommended to carefully
--   use explicit >>- only when needed.
--   
--   Here is an action of (>>-) on lists:
--   
--   
--   >>> take 20 $ [100,200..500] >>- (\x -> map (x +) [1..])
--   [101,201,102,301,103,202,104,401,105,203,106,302,107,204,108,501,109,205,110,303]
--   
--   
--   The result is map (100 +) [1..] interleaved with
--   [200,300..500] >>- (x -> map (x +) [1..]). You can
--   see that a half of the numbers starts from 1, a quarter starts from 2,
--   and so on exponentially. One could argue that (>>-) is a
--   very unfair conjunction!
(>>-) :: MonadLogic m => m a -> (a -> m b) -> m b
infixl 1 >>-

-- | Run a series with a modified depth.
localDepth :: forall (m :: Type -> Type) a. (Depth -> Depth) -> Series m a -> Series m a

-- | Run a Series with the depth decreased by 1.
--   
--   If the current depth is less or equal to 0, the result is
--   empty.
decDepth :: forall (m :: Type -> Type) a. Series m a -> Series m a

-- | Query the current depth.
getDepth :: forall (m :: Type -> Type). Series m Depth

-- | A simple series specified by a function from depth to the list of
--   values up to that depth.
generate :: forall a (m :: Type -> Type). (Depth -> [a]) -> Series m a

-- | Limit a Series to its first n elements.
limit :: forall (m :: Type -> Type) a. Monad m => Int -> Series m a -> Series m a

-- | Given a depth, return the list of values generated by a Serial
--   instance.
--   
--   For example, list all integers up to depth 1:
--   
--   
--   
- 
listSeries 1 :: [Int] -- returns [0,1,-1]

--   
listSeries :: Serial Identity a => Depth -> [a]

-- | Return the list of values generated by a Series. Useful for
--   debugging Serial instances.
--   
--   Examples:
--   
--   
--   
- 
list 3 series :: [Int] -- returns
--   [0,1,-1,2,-2,3,-3]

--   
- 
list 3 (series :: Series Identity
--   Int) -- returns [0,1,-1,2,-2,3,-3]

--   
- 
list 2 series :: [[Bool]] -- returns
--   [[],[True],[False]]

--   
--   
--   The first two are equivalent. The second has a more explicit type
--   binding.
list :: Depth -> Series Identity a -> [a]

-- | Monadic version of list.
listM :: Applicative m => Depth -> Series m a -> m [a]

-- | Fix the depth of a series at the current level. The resulting series
--   will no longer depend on the "ambient" depth.
fixDepth :: forall (m :: Type -> Type) a. Series m a -> Series m (Series m a)

-- | If the current depth is 0, evaluate the first argument. Otherwise,
--   evaluate the second argument with decremented depth.
decDepthChecked :: forall (m :: Type -> Type) a. Series m a -> Series m a -> Series m a

-- | 
--   constM = liftM const
--   
constM :: Monad m => m b -> m (a -> b)
instance (GHC.Internal.Num.Num a, GHC.Internal.Enum.Bounded a) => GHC.Internal.Enum.Bounded (Test.SmallCheck.Series.NonNegative a)
instance (GHC.Classes.Eq a, GHC.Internal.Num.Num a, GHC.Internal.Enum.Bounded a) => GHC.Internal.Enum.Bounded (Test.SmallCheck.Series.NonZero a)
instance (GHC.Internal.Num.Num a, GHC.Internal.Enum.Bounded a) => GHC.Internal.Enum.Bounded (Test.SmallCheck.Series.Positive a)
instance GHC.Internal.Base.Monad m => Test.SmallCheck.Series.CoSerial m GHC.Types.Bool
instance GHC.Internal.Base.Monad m => Test.SmallCheck.Series.CoSerial m GHC.Internal.Foreign.C.Types.CBool
instance GHC.Internal.Base.Monad m => Test.SmallCheck.Series.CoSerial m GHC.Internal.Foreign.C.Types.CChar
instance GHC.Internal.Base.Monad m => Test.SmallCheck.Series.CoSerial m GHC.Internal.Foreign.C.Types.CClock
instance GHC.Internal.Base.Monad m => Test.SmallCheck.Series.CoSerial m GHC.Internal.Foreign.C.Types.CDouble
instance GHC.Internal.Base.Monad m => Test.SmallCheck.Series.CoSerial m GHC.Internal.Foreign.C.Types.CFloat
instance GHC.Internal.Base.Monad m => Test.SmallCheck.Series.CoSerial m GHC.Internal.Foreign.C.Types.CInt
instance GHC.Internal.Base.Monad m => Test.SmallCheck.Series.CoSerial m GHC.Internal.Foreign.C.Types.CIntMax
instance GHC.Internal.Base.Monad m => Test.SmallCheck.Series.CoSerial m GHC.Internal.Foreign.C.Types.CIntPtr
instance GHC.Internal.Base.Monad m => Test.SmallCheck.Series.CoSerial m GHC.Internal.Foreign.C.Types.CLLong
instance GHC.Internal.Base.Monad m => Test.SmallCheck.Series.CoSerial m GHC.Internal.Foreign.C.Types.CLong
instance GHC.Internal.Base.Monad m => Test.SmallCheck.Series.CoSerial m GHC.Internal.Foreign.C.Types.CPtrdiff
instance GHC.Internal.Base.Monad m => Test.SmallCheck.Series.CoSerial m GHC.Internal.Foreign.C.Types.CSChar
instance GHC.Internal.Base.Monad m => Test.SmallCheck.Series.CoSerial m GHC.Internal.Foreign.C.Types.CSUSeconds
instance GHC.Internal.Base.Monad m => Test.SmallCheck.Series.CoSerial m GHC.Internal.Foreign.C.Types.CShort
instance GHC.Internal.Base.Monad m => Test.SmallCheck.Series.CoSerial m GHC.Internal.Foreign.C.Types.CSigAtomic
instance GHC.Internal.Base.Monad m => Test.SmallCheck.Series.CoSerial m GHC.Internal.Foreign.C.Types.CSize
instance GHC.Internal.Base.Monad m => Test.SmallCheck.Series.CoSerial m GHC.Internal.Foreign.C.Types.CTime
instance GHC.Internal.Base.Monad m => Test.SmallCheck.Series.CoSerial m GHC.Internal.Foreign.C.Types.CUChar
instance GHC.Internal.Base.Monad m => Test.SmallCheck.Series.CoSerial m GHC.Internal.Foreign.C.Types.CUInt
instance GHC.Internal.Base.Monad m => Test.SmallCheck.Series.CoSerial m GHC.Internal.Foreign.C.Types.CUIntMax
instance GHC.Internal.Base.Monad m => Test.SmallCheck.Series.CoSerial m GHC.Internal.Foreign.C.Types.CUIntPtr
instance GHC.Internal.Base.Monad m => Test.SmallCheck.Series.CoSerial m GHC.Internal.Foreign.C.Types.CULLong
instance GHC.Internal.Base.Monad m => Test.SmallCheck.Series.CoSerial m GHC.Internal.Foreign.C.Types.CULong
instance GHC.Internal.Base.Monad m => Test.SmallCheck.Series.CoSerial m GHC.Internal.Foreign.C.Types.CUSeconds
instance GHC.Internal.Base.Monad m => Test.SmallCheck.Series.CoSerial m GHC.Internal.Foreign.C.Types.CUShort
instance GHC.Internal.Base.Monad m => Test.SmallCheck.Series.CoSerial m GHC.Internal.Foreign.C.Types.CWchar
instance GHC.Internal.Base.Monad m => Test.SmallCheck.Series.CoSerial m GHC.Types.Char
instance Test.SmallCheck.Series.CoSerial m a => Test.SmallCheck.Series.CoSerial m (Data.Complex.Complex a)
instance (GHC.Internal.Base.Monad m, Test.SmallCheck.Series.CoSerial m (f (g a))) => Test.SmallCheck.Series.CoSerial m (Data.Functor.Compose.Compose f g a)
instance GHC.Internal.Base.Monad m => Test.SmallCheck.Series.CoSerial m GHC.Types.Double
instance (Test.SmallCheck.Series.CoSerial m a, Test.SmallCheck.Series.CoSerial m b) => Test.SmallCheck.Series.CoSerial m (GHC.Internal.Data.Either.Either a b)
instance (Test.SmallCheck.Series.Serial m a, Test.SmallCheck.Series.CoSerial m a, Test.SmallCheck.Series.Serial m b, Test.SmallCheck.Series.CoSerial m b) => Test.SmallCheck.Series.CoSerial m (a -> b)
instance GHC.Internal.Base.Monad m => Test.SmallCheck.Series.CoSerial m GHC.Types.Float
instance GHC.Internal.Base.Monad m => Test.SmallCheck.Series.CoSerial m GHC.Types.Int
instance GHC.Internal.Base.Monad m => Test.SmallCheck.Series.CoSerial m GHC.Internal.Int.Int16
instance GHC.Internal.Base.Monad m => Test.SmallCheck.Series.CoSerial m GHC.Internal.Int.Int32
instance GHC.Internal.Base.Monad m => Test.SmallCheck.Series.CoSerial m GHC.Internal.Int.Int64
instance GHC.Internal.Base.Monad m => Test.SmallCheck.Series.CoSerial m GHC.Internal.Int.Int8
instance GHC.Internal.Base.Monad m => Test.SmallCheck.Series.CoSerial m GHC.Num.Integer.Integer
instance Test.SmallCheck.Series.CoSerial m a => Test.SmallCheck.Series.CoSerial m [a]
instance (GHC.Classes.Ord a, GHC.Internal.Num.Num a, GHC.Internal.Base.Monad m) => Test.SmallCheck.Series.CoSerial m (Test.SmallCheck.Series.M a)
instance Test.SmallCheck.Series.CoSerial m a => Test.SmallCheck.Series.CoSerial m (GHC.Internal.Maybe.Maybe a)
instance (GHC.Internal.Real.Integral a, GHC.Internal.Base.Monad m) => Test.SmallCheck.Series.CoSerial m (Test.SmallCheck.Series.N a)
instance GHC.Internal.Base.Monad m => Test.SmallCheck.Series.CoSerial m GHC.Num.Natural.Natural
instance Test.SmallCheck.Series.CoSerial m a => Test.SmallCheck.Series.CoSerial m (GHC.Internal.Base.NonEmpty a)
instance GHC.Internal.Base.Monad m => Test.SmallCheck.Series.CoSerial m GHC.Types.Ordering
instance (GHC.Internal.Real.Integral i, Test.SmallCheck.Series.CoSerial m i) => Test.SmallCheck.Series.CoSerial m (GHC.Internal.Real.Ratio i)
instance (Test.SmallCheck.Series.CoSerial m a, Test.SmallCheck.Series.CoSerial m b) => Test.SmallCheck.Series.CoSerial m (a, b)
instance (Test.SmallCheck.Series.CoSerial m a, Test.SmallCheck.Series.CoSerial m b, Test.SmallCheck.Series.CoSerial m c) => Test.SmallCheck.Series.CoSerial m (a, b, c)
instance (Test.SmallCheck.Series.CoSerial m a, Test.SmallCheck.Series.CoSerial m b, Test.SmallCheck.Series.CoSerial m c, Test.SmallCheck.Series.CoSerial m d) => Test.SmallCheck.Series.CoSerial m (a, b, c, d)
instance (Test.SmallCheck.Series.CoSerial m a, Test.SmallCheck.Series.CoSerial m b, Test.SmallCheck.Series.CoSerial m c, Test.SmallCheck.Series.CoSerial m d, Test.SmallCheck.Series.CoSerial m e) => Test.SmallCheck.Series.CoSerial m (a, b, c, d, e)
instance (Test.SmallCheck.Series.CoSerial m a, Test.SmallCheck.Series.CoSerial m b, Test.SmallCheck.Series.CoSerial m c, Test.SmallCheck.Series.CoSerial m d, Test.SmallCheck.Series.CoSerial m e, Test.SmallCheck.Series.CoSerial m f) => Test.SmallCheck.Series.CoSerial m (a, b, c, d, e, f)
instance GHC.Internal.Base.Monad m => Test.SmallCheck.Series.CoSerial m ()
instance GHC.Internal.Base.Monad m => Test.SmallCheck.Series.CoSerial m GHC.Internal.Base.Void
instance GHC.Internal.Base.Monad m => Test.SmallCheck.Series.CoSerial m GHC.Types.Word
instance GHC.Internal.Base.Monad m => Test.SmallCheck.Series.CoSerial m GHC.Internal.Word.Word16
instance GHC.Internal.Base.Monad m => Test.SmallCheck.Series.CoSerial m GHC.Internal.Word.Word32
instance GHC.Internal.Base.Monad m => Test.SmallCheck.Series.CoSerial m GHC.Internal.Word.Word64
instance GHC.Internal.Base.Monad m => Test.SmallCheck.Series.CoSerial m GHC.Internal.Word.Word8
instance GHC.Internal.Enum.Enum a => GHC.Internal.Enum.Enum (Test.SmallCheck.Series.M a)
instance GHC.Internal.Enum.Enum a => GHC.Internal.Enum.Enum (Test.SmallCheck.Series.N a)
instance GHC.Internal.Enum.Enum a => GHC.Internal.Enum.Enum (Test.SmallCheck.Series.NonNegative a)
instance GHC.Internal.Enum.Enum a => GHC.Internal.Enum.Enum (Test.SmallCheck.Series.NonZero a)
instance GHC.Internal.Enum.Enum a => GHC.Internal.Enum.Enum (Test.SmallCheck.Series.Positive a)
instance GHC.Classes.Eq a => GHC.Classes.Eq (Test.SmallCheck.Series.M a)
instance GHC.Classes.Eq a => GHC.Classes.Eq (Test.SmallCheck.Series.N a)
instance GHC.Classes.Eq a => GHC.Classes.Eq (Test.SmallCheck.Series.NonNegative a)
instance GHC.Classes.Eq a => GHC.Classes.Eq (Test.SmallCheck.Series.NonZero a)
instance GHC.Classes.Eq a => GHC.Classes.Eq (Test.SmallCheck.Series.Positive a)
instance GHC.Internal.Data.Foldable.Foldable Test.SmallCheck.Series.NonNegative
instance GHC.Internal.Data.Foldable.Foldable Test.SmallCheck.Series.NonZero
instance GHC.Internal.Data.Foldable.Foldable Test.SmallCheck.Series.Positive
instance GHC.Internal.Base.Functor Test.SmallCheck.Series.NonNegative
instance GHC.Internal.Base.Functor Test.SmallCheck.Series.NonZero
instance GHC.Internal.Base.Functor Test.SmallCheck.Series.Positive
instance (GHC.Internal.Base.Monad m, Test.SmallCheck.Series.GCoSerial m a, Test.SmallCheck.Series.GCoSerial m b) => Test.SmallCheck.Series.GCoSerial m (a GHC.Internal.Generics.:*: b)
instance (GHC.Internal.Base.Monad m, Test.SmallCheck.Series.GCoSerial m a, Test.SmallCheck.Series.GCoSerial m b) => Test.SmallCheck.Series.GCoSerial m (a GHC.Internal.Generics.:+: b)
instance Test.SmallCheck.Series.CoSerial m c => Test.SmallCheck.Series.GCoSerial m (GHC.Internal.Generics.K1 i c)
instance Test.SmallCheck.Series.GCoSerial m f => Test.SmallCheck.Series.GCoSerial m (GHC.Internal.Generics.M1 i c f)
instance Test.SmallCheck.Series.GCoSerial m GHC.Internal.Generics.U1
instance Test.SmallCheck.Series.GCoSerial m GHC.Internal.Generics.V1
instance (GHC.Internal.Base.Monad m, Test.SmallCheck.Series.GSerial m a, Test.SmallCheck.Series.GSerial m b) => Test.SmallCheck.Series.GSerial m (a GHC.Internal.Generics.:*: b)
instance (GHC.Internal.Base.Monad m, Test.SmallCheck.Series.GSerial m a, Test.SmallCheck.Series.GSerial m b) => Test.SmallCheck.Series.GSerial m (a GHC.Internal.Generics.:+: b)
instance Test.SmallCheck.Series.Serial m c => Test.SmallCheck.Series.GSerial m (GHC.Internal.Generics.K1 i c)
instance Test.SmallCheck.Series.GSerial m f => Test.SmallCheck.Series.GSerial m (GHC.Internal.Generics.M1 i c f)
instance Test.SmallCheck.Series.GSerial m f => Test.SmallCheck.Series.GSerial m (GHC.Internal.Generics.C1 c f)
instance Test.SmallCheck.Series.GSerial m GHC.Internal.Generics.U1
instance Test.SmallCheck.Series.GSerial m GHC.Internal.Generics.V1
instance GHC.Internal.Real.Integral a => GHC.Internal.Real.Integral (Test.SmallCheck.Series.M a)
instance GHC.Internal.Real.Integral a => GHC.Internal.Real.Integral (Test.SmallCheck.Series.N a)
instance GHC.Internal.Real.Integral a => GHC.Internal.Real.Integral (Test.SmallCheck.Series.NonNegative a)
instance GHC.Internal.Real.Integral a => GHC.Internal.Real.Integral (Test.SmallCheck.Series.NonZero a)
instance GHC.Internal.Real.Integral a => GHC.Internal.Real.Integral (Test.SmallCheck.Series.Positive a)
instance GHC.Internal.Num.Num a => GHC.Internal.Num.Num (Test.SmallCheck.Series.M a)
instance GHC.Internal.Num.Num a => GHC.Internal.Num.Num (Test.SmallCheck.Series.N a)
instance GHC.Internal.Num.Num a => GHC.Internal.Num.Num (Test.SmallCheck.Series.NonNegative a)
instance GHC.Internal.Num.Num a => GHC.Internal.Num.Num (Test.SmallCheck.Series.NonZero a)
instance GHC.Internal.Num.Num a => GHC.Internal.Num.Num (Test.SmallCheck.Series.Positive a)
instance GHC.Classes.Ord a => GHC.Classes.Ord (Test.SmallCheck.Series.M a)
instance GHC.Classes.Ord a => GHC.Classes.Ord (Test.SmallCheck.Series.N a)
instance GHC.Classes.Ord a => GHC.Classes.Ord (Test.SmallCheck.Series.NonNegative a)
instance GHC.Classes.Ord a => GHC.Classes.Ord (Test.SmallCheck.Series.NonZero a)
instance GHC.Classes.Ord a => GHC.Classes.Ord (Test.SmallCheck.Series.Positive a)
instance GHC.Internal.Real.Real a => GHC.Internal.Real.Real (Test.SmallCheck.Series.M a)
instance GHC.Internal.Real.Real a => GHC.Internal.Real.Real (Test.SmallCheck.Series.N a)
instance GHC.Internal.Real.Real a => GHC.Internal.Real.Real (Test.SmallCheck.Series.NonNegative a)
instance GHC.Internal.Real.Real a => GHC.Internal.Real.Real (Test.SmallCheck.Series.NonZero a)
instance GHC.Internal.Real.Real a => GHC.Internal.Real.Real (Test.SmallCheck.Series.Positive a)
instance GHC.Internal.Base.Monad m => Test.SmallCheck.Series.Serial m GHC.Types.Bool
instance GHC.Internal.Base.Monad m => Test.SmallCheck.Series.Serial m GHC.Internal.Foreign.C.Types.CBool
instance GHC.Internal.Base.Monad m => Test.SmallCheck.Series.Serial m GHC.Internal.Foreign.C.Types.CChar
instance GHC.Internal.Base.Monad m => Test.SmallCheck.Series.Serial m GHC.Internal.Foreign.C.Types.CClock
instance GHC.Internal.Base.Monad m => Test.SmallCheck.Series.Serial m GHC.Internal.Foreign.C.Types.CDouble
instance GHC.Internal.Base.Monad m => Test.SmallCheck.Series.Serial m GHC.Internal.Foreign.C.Types.CFloat
instance GHC.Internal.Base.Monad m => Test.SmallCheck.Series.Serial m GHC.Internal.Foreign.C.Types.CInt
instance GHC.Internal.Base.Monad m => Test.SmallCheck.Series.Serial m GHC.Internal.Foreign.C.Types.CIntMax
instance GHC.Internal.Base.Monad m => Test.SmallCheck.Series.Serial m GHC.Internal.Foreign.C.Types.CIntPtr
instance GHC.Internal.Base.Monad m => Test.SmallCheck.Series.Serial m GHC.Internal.Foreign.C.Types.CLLong
instance GHC.Internal.Base.Monad m => Test.SmallCheck.Series.Serial m GHC.Internal.Foreign.C.Types.CLong
instance GHC.Internal.Base.Monad m => Test.SmallCheck.Series.Serial m GHC.Internal.Foreign.C.Types.CPtrdiff
instance GHC.Internal.Base.Monad m => Test.SmallCheck.Series.Serial m GHC.Internal.Foreign.C.Types.CSChar
instance GHC.Internal.Base.Monad m => Test.SmallCheck.Series.Serial m GHC.Internal.Foreign.C.Types.CSUSeconds
instance GHC.Internal.Base.Monad m => Test.SmallCheck.Series.Serial m GHC.Internal.Foreign.C.Types.CShort
instance GHC.Internal.Base.Monad m => Test.SmallCheck.Series.Serial m GHC.Internal.Foreign.C.Types.CSigAtomic
instance GHC.Internal.Base.Monad m => Test.SmallCheck.Series.Serial m GHC.Internal.Foreign.C.Types.CSize
instance GHC.Internal.Base.Monad m => Test.SmallCheck.Series.Serial m GHC.Internal.Foreign.C.Types.CTime
instance GHC.Internal.Base.Monad m => Test.SmallCheck.Series.Serial m GHC.Internal.Foreign.C.Types.CUChar
instance GHC.Internal.Base.Monad m => Test.SmallCheck.Series.Serial m GHC.Internal.Foreign.C.Types.CUInt
instance GHC.Internal.Base.Monad m => Test.SmallCheck.Series.Serial m GHC.Internal.Foreign.C.Types.CUIntMax
instance GHC.Internal.Base.Monad m => Test.SmallCheck.Series.Serial m GHC.Internal.Foreign.C.Types.CUIntPtr
instance GHC.Internal.Base.Monad m => Test.SmallCheck.Series.Serial m GHC.Internal.Foreign.C.Types.CULLong
instance GHC.Internal.Base.Monad m => Test.SmallCheck.Series.Serial m GHC.Internal.Foreign.C.Types.CULong
instance GHC.Internal.Base.Monad m => Test.SmallCheck.Series.Serial m GHC.Internal.Foreign.C.Types.CUSeconds
instance GHC.Internal.Base.Monad m => Test.SmallCheck.Series.Serial m GHC.Internal.Foreign.C.Types.CUShort
instance GHC.Internal.Base.Monad m => Test.SmallCheck.Series.Serial m GHC.Internal.Foreign.C.Types.CWchar
instance GHC.Internal.Base.Monad m => Test.SmallCheck.Series.Serial m GHC.Types.Char
instance Test.SmallCheck.Series.Serial m a => Test.SmallCheck.Series.Serial m (Data.Complex.Complex a)
instance (GHC.Internal.Base.Monad m, Test.SmallCheck.Series.Serial m (f (g a))) => Test.SmallCheck.Series.Serial m (Data.Functor.Compose.Compose f g a)
instance GHC.Internal.Base.Monad m => Test.SmallCheck.Series.Serial m GHC.Types.Double
instance (Test.SmallCheck.Series.Serial m a, Test.SmallCheck.Series.Serial m b) => Test.SmallCheck.Series.Serial m (GHC.Internal.Data.Either.Either a b)
instance (Test.SmallCheck.Series.CoSerial m a, Test.SmallCheck.Series.Serial m b) => Test.SmallCheck.Series.Serial m (a -> b)
instance GHC.Internal.Base.Monad m => Test.SmallCheck.Series.Serial m GHC.Types.Float
instance GHC.Internal.Base.Monad m => Test.SmallCheck.Series.Serial m GHC.Types.Int
instance GHC.Internal.Base.Monad m => Test.SmallCheck.Series.Serial m GHC.Internal.Int.Int16
instance GHC.Internal.Base.Monad m => Test.SmallCheck.Series.Serial m GHC.Internal.Int.Int32
instance GHC.Internal.Base.Monad m => Test.SmallCheck.Series.Serial m GHC.Internal.Int.Int64
instance GHC.Internal.Base.Monad m => Test.SmallCheck.Series.Serial m GHC.Internal.Int.Int8
instance GHC.Internal.Base.Monad m => Test.SmallCheck.Series.Serial m GHC.Num.Integer.Integer
instance Test.SmallCheck.Series.Serial m a => Test.SmallCheck.Series.Serial m [a]
instance (GHC.Internal.Num.Num a, GHC.Internal.Enum.Enum a, GHC.Internal.Base.Monad m) => Test.SmallCheck.Series.Serial m (Test.SmallCheck.Series.M a)
instance Test.SmallCheck.Series.Serial m a => Test.SmallCheck.Series.Serial m (GHC.Internal.Maybe.Maybe a)
instance (GHC.Internal.Num.Num a, GHC.Internal.Enum.Enum a, Test.SmallCheck.Series.Serial m a) => Test.SmallCheck.Series.Serial m (Test.SmallCheck.Series.N a)
instance GHC.Internal.Base.Monad m => Test.SmallCheck.Series.Serial m GHC.Num.Natural.Natural
instance Test.SmallCheck.Series.Serial m a => Test.SmallCheck.Series.Serial m (GHC.Internal.Base.NonEmpty a)
instance Test.SmallCheck.Series.Serial m a => Test.SmallCheck.Series.Serial m (Test.SmallCheck.Series.NonEmpty a)
instance (GHC.Internal.Num.Num a, GHC.Classes.Ord a, Test.SmallCheck.Series.Serial m a) => Test.SmallCheck.Series.Serial m (Test.SmallCheck.Series.NonNegative a)
instance (GHC.Internal.Num.Num a, GHC.Classes.Ord a, Test.SmallCheck.Series.Serial m a) => Test.SmallCheck.Series.Serial m (Test.SmallCheck.Series.NonZero a)
instance GHC.Internal.Base.Monad m => Test.SmallCheck.Series.Serial m GHC.Types.Ordering
instance (GHC.Internal.Num.Num a, GHC.Classes.Ord a, Test.SmallCheck.Series.Serial m a) => Test.SmallCheck.Series.Serial m (Test.SmallCheck.Series.Positive a)
instance (GHC.Internal.Real.Integral i, Test.SmallCheck.Series.Serial m i) => Test.SmallCheck.Series.Serial m (GHC.Internal.Real.Ratio i)
instance (Test.SmallCheck.Series.Serial m a, Test.SmallCheck.Series.Serial m b) => Test.SmallCheck.Series.Serial m (a, b)
instance (Test.SmallCheck.Series.Serial m a, Test.SmallCheck.Series.Serial m b, Test.SmallCheck.Series.Serial m c) => Test.SmallCheck.Series.Serial m (a, b, c)
instance (Test.SmallCheck.Series.Serial m a, Test.SmallCheck.Series.Serial m b, Test.SmallCheck.Series.Serial m c, Test.SmallCheck.Series.Serial m d) => Test.SmallCheck.Series.Serial m (a, b, c, d)
instance (Test.SmallCheck.Series.Serial m a, Test.SmallCheck.Series.Serial m b, Test.SmallCheck.Series.Serial m c, Test.SmallCheck.Series.Serial m d, Test.SmallCheck.Series.Serial m e) => Test.SmallCheck.Series.Serial m (a, b, c, d, e)
instance (Test.SmallCheck.Series.Serial m a, Test.SmallCheck.Series.Serial m b, Test.SmallCheck.Series.Serial m c, Test.SmallCheck.Series.Serial m d, Test.SmallCheck.Series.Serial m e, Test.SmallCheck.Series.Serial m f) => Test.SmallCheck.Series.Serial m (a, b, c, d, e, f)
instance GHC.Internal.Base.Monad m => Test.SmallCheck.Series.Serial m ()
instance GHC.Internal.Base.Monad m => Test.SmallCheck.Series.Serial m GHC.Internal.Base.Void
instance GHC.Internal.Base.Monad m => Test.SmallCheck.Series.Serial m GHC.Types.Word
instance GHC.Internal.Base.Monad m => Test.SmallCheck.Series.Serial m GHC.Internal.Word.Word16
instance GHC.Internal.Base.Monad m => Test.SmallCheck.Series.Serial m GHC.Internal.Word.Word32
instance GHC.Internal.Base.Monad m => Test.SmallCheck.Series.Serial m GHC.Internal.Word.Word64
instance GHC.Internal.Base.Monad m => Test.SmallCheck.Series.Serial m GHC.Internal.Word.Word8
instance (Test.SmallCheck.Series.Serial GHC.Internal.Data.Functor.Identity.Identity a, GHC.Internal.Show.Show a, GHC.Internal.Show.Show b) => GHC.Internal.Show.Show (a -> b)
instance GHC.Internal.Show.Show a => GHC.Internal.Show.Show (Test.SmallCheck.Series.M a)
instance GHC.Internal.Show.Show a => GHC.Internal.Show.Show (Test.SmallCheck.Series.N a)
instance GHC.Internal.Show.Show a => GHC.Internal.Show.Show (Test.SmallCheck.Series.NonEmpty a)
instance GHC.Internal.Show.Show a => GHC.Internal.Show.Show (Test.SmallCheck.Series.NonNegative a)
instance GHC.Internal.Show.Show a => GHC.Internal.Show.Show (Test.SmallCheck.Series.NonZero a)
instance GHC.Internal.Show.Show a => GHC.Internal.Show.Show (Test.SmallCheck.Series.Positive a)
instance GHC.Internal.Data.Traversable.Traversable Test.SmallCheck.Series.NonNegative
instance GHC.Internal.Data.Traversable.Traversable Test.SmallCheck.Series.NonZero
instance GHC.Internal.Data.Traversable.Traversable Test.SmallCheck.Series.Positive

-- | You should only need this module if you wish to create your own way to
--   run SmallCheck tests
module Test.SmallCheck.Drivers

-- | A simple driver that runs the test in the IO monad and prints
--   the results.
smallCheck :: Testable IO a => Depth -> a -> IO ()

-- | Use this if:
--   
--   
--   
- You need to run a test in a monad different from IO
--   
- You need to analyse the results rather than just print them
--   
smallCheckM :: Testable m a => Depth -> a -> m (Maybe PropertyFailure)

-- | Like smallCheckM, but allows to specify a monadic hook that
--   gets executed after each test is run.
--   
--   Useful for applications that want to report progress information to
--   the user.
smallCheckWithHook :: Testable m a => Depth -> (TestQuality -> m ()) -> a -> m (Maybe PropertyFailure)

test :: Testable m a => a -> Property m

ppFailure :: PropertyFailure -> String

data PropertyFailure
NotExist :: PropertyFailure
AtLeastTwo :: [Argument] -> PropertySuccess -> [Argument] -> PropertySuccess -> PropertyFailure
CounterExample :: [Argument] -> PropertyFailure -> PropertyFailure

PropertyFalse :: Maybe Reason -> PropertyFailure

data PropertySuccess
Exist :: [Argument] -> PropertySuccess -> PropertySuccess
ExistUnique :: [Argument] -> PropertySuccess -> PropertySuccess

PropertyTrue :: Maybe Reason -> PropertySuccess
Vacuously :: PropertyFailure -> PropertySuccess

type Argument = String

-- | An explanation for the test outcome.
type Reason = String

data TestQuality
GoodTest :: TestQuality
BadTest :: TestQuality

-- | This module exports the main pieces of SmallCheck functionality.
--   
--   To generate test cases for your own types, refer to
--   Test.SmallCheck.Series.
--   
--   For pointers to other sources of information about SmallCheck, please
--   refer to the README at
--   https://github.com/Bodigrim/smallcheck/blob/master/README.md
module Test.SmallCheck

-- | Set the universal quantification context.
forAll :: forall (m :: Type -> Type) a. Testable m a => a -> Property m

-- | Set the existential quantification context.
exists :: forall (m :: Type -> Type) a. Testable m a => a -> Property m

-- | Set the uniqueness quantification context.
--   
--   Bear in mind that <math> is not the same as <math>.
--   
--   For example, <math> is true (it holds only when <math>),
--   but <math> is false (there are many such pairs).
--   
--   As is customary in mathematics, existsUnique $ \x y -> p
--   x y is equivalent to existsUnique $ \(x, y) -> p x
--   y and not to existsUnique $ \x ->
--   existsUnique $ \y -> p x y (the latter, of course, may
--   be explicitly written when desired).
--   
--   That is, all the variables affected by the same uniqueness context are
--   quantified simultaneously as a tuple.
existsUnique :: forall (m :: Type -> Type) a. Testable m a => a -> Property m

-- | over s $ \x -> p x makes x range over the
--   Series s (by default, all variables range over the
--   series for their types).
--   
--   Note that, unlike the quantification operators, this affects only the
--   variable following the operator and not subsequent variables.
--   
--   over does not affect the quantification context.
over :: forall a (m :: Type -> Type) b. (Show a, Testable m b) => Series m a -> (a -> b) -> Property m

-- | Execute a monadic test.
monadic :: Testable m a => m a -> Property m

-- | The ==> operator can be used to express a restricting
--   condition under which a property should hold. It corresponds to
--   implication in the classical logic.
--   
--   Note that ==> resets the quantification context for its
--   operands to the default (universal).
(==>) :: forall (m :: Type -> Type) c a. (Testable m c, Testable m a) => c -> a -> Property m
infixr 0 ==>

-- | Run property with a modified depth. Affects all quantified variables
--   in the property.
changeDepth :: forall (m :: Type -> Type) a. Testable m a => (Depth -> Depth) -> a -> Property m

-- | Quantify the function's argument over its series, but adjust
--   the depth. This doesn't affect any subsequent variables.
changeDepth1 :: forall a (m :: Type -> Type) b. (Show a, Serial m a, Testable m b) => (Depth -> Depth) -> (a -> b) -> Property m

-- | Maximum depth of generated test values.
--   
--   For data values, it is the depth of nested constructor applications.
--   
--   For functional values, it is both the depth of nested case analysis
--   and the depth of results.
type Depth = Int

-- | A simple driver that runs the test in the IO monad and prints
--   the results.
smallCheck :: Testable IO a => Depth -> a -> IO ()

-- | Class of tests that can be run in a monad. For pure tests, it is
--   recommended to keep their types polymorphic in m rather than
--   specialising it to Identity.
class Monad m => Testable (m :: Type -> Type) a

test :: Testable m a => a -> Property m

-- | The type of properties over the monad m.
data Property (m :: Type -> Type)

-- | An explanation for the test outcome.
type Reason = String
