Safe Haskell | Safe |
---|---|
Language | Haskell2010 |
Test.QuickCheck.Safe
Description
This module implements a simplified, pure version of Test.Quickcheck's quickCheck functionality.
Synopsis
- quickCheck :: STestable prop => QCGen -> prop -> String
- quickCheckResult :: STestable prop => QCGen -> prop -> Result
- quickCheckWith :: STestable prop => Args -> QCGen -> prop -> String
- quickCheckWithResult :: STestable prop => Args -> QCGen -> prop -> Result
- class STestable prop
- (==>) :: STestable prop => Bool -> prop -> SProperty
- (.||.) :: (STestable prop2, STestable prop1) => prop1 -> prop2 -> SProperty
- (.&&.) :: (STestable prop2, STestable prop1) => prop1 -> prop2 -> SProperty
- (.&.) :: (STestable prop2, STestable prop1) => prop1 -> prop2 -> SProperty
- (===) :: (Eq a, Show a) => a -> a -> SProperty
- label :: STestable prop => String -> prop -> SProperty
- shrinking :: STestable prop => (a -> [a]) -> a -> (a -> prop) -> SProperty
- noShrinking :: STestable prop => prop -> SProperty
- mapSize :: STestable prop => (Int -> Int) -> prop -> SProperty
- forAll :: (Show a, STestable prop) => Gen a -> (a -> prop) -> SProperty
- forAllShrink :: (Show a, STestable prop) => Gen a -> (a -> [a]) -> (a -> prop) -> SProperty
- inventQCGen :: a -> QCGen
- data Fun a b = Fun (a :-> b, b, Shrunk) (a -> b)
- data Gen a
- class CoArbitrary a where
- coarbitrary :: a -> Gen b -> Gen b
- class Arbitrary2 (f :: Type -> Type -> Type) where
- liftArbitrary2 :: Gen a -> Gen b -> Gen (f a b)
- liftShrink2 :: (a -> [a]) -> (b -> [b]) -> f a b -> [f a b]
- class Arbitrary1 (f :: Type -> Type) where
- liftArbitrary :: Gen a -> Gen (f a)
- liftShrink :: (a -> [a]) -> f a -> [f a]
- class Arbitrary a where
- newtype PrintableString = PrintableString {}
- newtype UnicodeString = UnicodeString {}
- newtype ASCIIString = ASCIIString {}
- class ShrinkState s a where
- shrinkInit :: a -> s
- shrinkState :: a -> s -> [(a, s)]
- data Shrinking s a = Shrinking s a
- data Smart a = Smart Int a
- newtype Shrink2 a = Shrink2 {
- getShrink2 :: a
- newtype Small a = Small {
- getSmall :: a
- newtype Large a = Large {
- getLarge :: a
- newtype NonPositive a = NonPositive {
- getNonPositive :: a
- newtype NonNegative a = NonNegative {
- getNonNegative :: a
- newtype NonZero a = NonZero {
- getNonZero :: a
- newtype Negative a = Negative {
- getNegative :: a
- newtype Positive a = Positive {
- getPositive :: a
- newtype SortedList a = Sorted {
- getSorted :: [a]
- data InfiniteList a = InfiniteList {
- getInfiniteList :: [a]
- infiniteListInternalData :: InfiniteListInternalData a
- newtype NonEmptyList a = NonEmpty {
- getNonEmpty :: [a]
- newtype OrderedList a = Ordered {
- getOrdered :: [a]
- newtype Fixed a = Fixed {
- getFixed :: a
- newtype Blind a = Blind {
- getBlind :: a
- class Function a where
- function :: (a -> b) -> a :-> b
- data Confidence = Confidence {}
- data Discard = Discard
- data Result
- = Success { }
- | GaveUp { }
- | Failure {
- numTests :: Int
- numDiscarded :: Int
- numShrinks :: Int
- numShrinkTries :: Int
- numShrinkFinal :: Int
- usedSeed :: QCGen
- usedSize :: Int
- reason :: String
- theException :: Maybe AnException
- output :: String
- failingTestCase :: [String]
- failingLabels :: [String]
- failingClasses :: Set String
- | NoExpectedFailure { }
- data Args = Args {
- replay :: Maybe (QCGen, Int)
- maxSuccess :: Int
- maxDiscardRatio :: Int
- maxSize :: Int
- chatty :: Bool
- maxShrinks :: Int
- pattern Fn3 :: (a -> b -> c -> d) -> Fun (a, b, c) d
- pattern Fn2 :: (a -> b -> c) -> Fun (a, b) c
- pattern Fn :: (a -> b) -> Fun a b
- vector :: Arbitrary a => Int -> Gen [a]
- discard :: a
- variant :: Integral n => n -> Gen a -> Gen a
- sized :: (Int -> Gen a) -> Gen a
- getSize :: Gen Int
- resize :: Int -> Gen a -> Gen a
- scale :: (Int -> Int) -> Gen a -> Gen a
- choose :: Random a => (a, a) -> Gen a
- chooseAny :: Random a => Gen a
- chooseEnum :: Enum a => (a, a) -> Gen a
- chooseInt :: (Int, Int) -> Gen Int
- chooseBoundedIntegral :: (Bounded a, Integral a) => (a, a) -> Gen a
- chooseInteger :: (Integer, Integer) -> Gen Integer
- generate :: Gen a -> IO a
- sample' :: Gen a -> IO [a]
- sample :: Show a => Gen a -> IO ()
- suchThat :: Gen a -> (a -> Bool) -> Gen a
- suchThatMap :: Gen a -> (a -> Maybe b) -> Gen b
- suchThatMaybe :: Gen a -> (a -> Bool) -> Gen (Maybe a)
- oneof :: [Gen a] -> Gen a
- frequency :: [(Int, Gen a)] -> Gen a
- elements :: [a] -> Gen a
- sublistOf :: [a] -> Gen [a]
- shuffle :: [a] -> Gen [a]
- growingElements :: [a] -> Gen a
- listOf :: Gen a -> Gen [a]
- listOf1 :: Gen a -> Gen [a]
- vectorOf :: Int -> Gen a -> Gen [a]
- infiniteListOf :: Gen a -> Gen [a]
- arbitrary1 :: (Arbitrary1 f, Arbitrary a) => Gen (f a)
- shrink1 :: (Arbitrary1 f, Arbitrary a) => f a -> [f a]
- arbitrary2 :: (Arbitrary2 f, Arbitrary a, Arbitrary b) => Gen (f a b)
- shrink2 :: (Arbitrary2 f, Arbitrary a, Arbitrary b) => f a b -> [f a b]
- genericShrink :: (Generic a, RecursivelyShrink (Rep a), GSubterms (Rep a) a) => a -> [a]
- recursivelyShrink :: (Generic a, RecursivelyShrink (Rep a)) => a -> [a]
- subterms :: (Generic a, GSubterms (Rep a) a) => a -> [a]
- shrinkList :: (a -> [a]) -> [a] -> [[a]]
- applyArbitrary2 :: (Arbitrary a, Arbitrary b) => (a -> b -> r) -> Gen r
- applyArbitrary3 :: (Arbitrary a, Arbitrary b, Arbitrary c) => (a -> b -> c -> r) -> Gen r
- applyArbitrary4 :: (Arbitrary a, Arbitrary b, Arbitrary c, Arbitrary d) => (a -> b -> c -> d -> r) -> Gen r
- arbitrarySizedIntegral :: Integral a => Gen a
- arbitrarySizedNatural :: Integral a => Gen a
- arbitrarySizedFractional :: Fractional a => Gen a
- arbitraryBoundedIntegral :: (Bounded a, Integral a) => Gen a
- arbitraryBoundedRandom :: (Bounded a, Random a) => Gen a
- arbitraryBoundedEnum :: (Bounded a, Enum a) => Gen a
- arbitrarySizedBoundedIntegral :: (Bounded a, Integral a) => Gen a
- arbitraryUnicodeChar :: Gen Char
- arbitraryASCIIChar :: Gen Char
- arbitraryPrintableChar :: Gen Char
- shrinkNothing :: a -> [a]
- shrinkMap :: Arbitrary a => (a -> b) -> (b -> a) -> b -> [b]
- shrinkMapBy :: (a -> b) -> (b -> a) -> (a -> [a]) -> b -> [b]
- shrinkIntegral :: Integral a => a -> [a]
- shrinkBoundedEnum :: (Bounded a, Enum a, Eq a) => a -> [a]
- shrinkRealFrac :: RealFrac a => a -> [a]
- shrinkDecimal :: RealFrac a => a -> [a]
- genericCoarbitrary :: (Generic a, GCoArbitrary (Rep a)) => a -> Gen b -> Gen b
- (><) :: (Gen a -> Gen a) -> (Gen a -> Gen a) -> Gen a -> Gen a
- coarbitraryIntegral :: Integral a => a -> Gen b -> Gen b
- coarbitraryReal :: Real a => a -> Gen b -> Gen b
- coarbitraryShow :: Show a => a -> Gen b -> Gen b
- coarbitraryEnum :: Enum a => a -> Gen b -> Gen b
- orderedList :: (Ord a, Arbitrary a) => Gen [a]
- infiniteList :: Arbitrary a => Gen [a]
- functionBoundedEnum :: (Eq a, Bounded a, Enum a) => (a -> b) -> a :-> b
- functionRealFrac :: RealFrac a => (a -> b) -> a :-> b
- functionIntegral :: Integral a => (a -> b) -> a :-> b
- functionShow :: (Show a, Read a) => (a -> c) -> a :-> c
- functionVoid :: (forall b. void -> b) -> void :-> c
- functionMap :: Function b => (a -> b) -> (b -> a) -> (a -> c) -> a :-> c
- applyFun :: Fun a b -> a -> b
- applyFun2 :: Fun (a, b) c -> a -> b -> c
- applyFun3 :: Fun (a, b, c) d -> a -> b -> c -> d
- ioProperty :: Testable prop => IO prop -> Property
- idempotentIOProperty :: Testable prop => IO prop -> Property
- whenFail :: Testable prop => IO () -> prop -> Property
- whenFail' :: Testable prop => IO () -> prop -> Property
- verboseShrinking :: Testable prop => prop -> Property
- again :: Testable prop => prop -> Property
- withMaxSuccess :: Testable prop => Int -> prop -> Property
- checkCoverage :: Testable prop => prop -> Property
- checkCoverageWith :: Testable prop => Confidence -> prop -> Property
- stdConfidence :: Confidence
- tabulate :: Testable prop => String -> [String] -> prop -> Property
- coverTable :: Testable prop => String -> [(String, Double)] -> prop -> Property
- discardAfter :: Testable prop => Int -> prop -> Property
- forAllShow :: Testable prop => Gen a -> (a -> String) -> (a -> prop) -> Property
- forAllBlind :: Testable prop => Gen a -> (a -> prop) -> Property
- forAllShrinkShow :: Testable prop => Gen a -> (a -> [a]) -> (a -> String) -> (a -> prop) -> Property
- forAllShrinkBlind :: Testable prop => Gen a -> (a -> [a]) -> (a -> prop) -> Property
- (=/=) :: (Eq a, Show a) => a -> a -> Property
- total :: NFData a => a -> Property
- isSuccess :: Result -> Bool
- stdArgs :: Args
- verboseCheck :: Testable prop => prop -> IO ()
- verboseCheckWith :: Testable prop => Args -> prop -> IO ()
- verboseCheckResult :: Testable prop => prop -> IO Result
- verboseCheckWithResult :: Testable prop => Args -> prop -> IO Result
- polyQuickCheck :: Name -> ExpQ
- polyVerboseCheck :: Name -> ExpQ
- monomorphic :: Name -> ExpQ
- forAllProperties :: Q Exp
- allProperties :: Q Exp
- quickCheckAll :: Q Exp
- verboseCheckAll :: Q Exp
- labelledExamples :: Testable prop => prop -> IO ()
- labelledExamplesWith :: Testable prop => Args -> prop -> IO ()
- labelledExamplesResult :: Testable prop => prop -> IO Result
- labelledExamplesWithResult :: Testable prop => Args -> prop -> IO Result
Checking properties
quickCheck :: STestable prop => QCGen -> prop -> String Source #
Cf. quickCheck
. Note that in contrast to QuickCheck's
function, this one takes an additional QCGen
argument.
>>>
putStr $ quickCheck (inventQCGen ()) (\x -> length (x :: [()]) < 10)
*** Failed! Falsifiable (after 18 tests and 3 shrinks): [(),(),(),(),(),(),(),(),(),(),(),(),(),(),()]
quickCheckResult :: STestable prop => QCGen -> prop -> Result Source #
Cf. quickCheckResult
. Note that in contrast to
QuickCheck's function, this one takes an additional QCGen
argument.
quickCheckWith :: STestable prop => Args -> QCGen -> prop -> String Source #
Cf. quickCheckWith
. Note that in contrast to
QuickCheck's function, this one takes an additional QCGen
argument.
quickCheckWithResult :: STestable prop => Args -> QCGen -> prop -> Result Source #
Cf. quickCheckWithResult
. Note that in contrast to
QuickCheck's function, this one takes an additional QCGen
argument.
Creating and combining properties
Minimal complete definition
sProperty
(.||.) :: (STestable prop2, STestable prop1) => prop1 -> prop2 -> SProperty Source #
Disjunction. Cf. .||.
.
(.&&.) :: (STestable prop2, STestable prop1) => prop1 -> prop2 -> SProperty Source #
Conjunction. Cf. .&&.
.
(.&.) :: (STestable prop2, STestable prop1) => prop1 -> prop2 -> SProperty Source #
Nondeterministic conjunction. Cf. &.
.
shrinking :: STestable prop => (a -> [a]) -> a -> (a -> prop) -> SProperty Source #
Shrink counterexamples. Cf. shrinking
.
noShrinking :: STestable prop => prop -> SProperty Source #
Suppress shrinking of counterexamples. Cf. noShrinking
.
mapSize :: STestable prop => (Int -> Int) -> prop -> SProperty Source #
Adjust testcase sizes. Cf. mapSize
.
forAll :: (Show a, STestable prop) => Gen a -> (a -> prop) -> SProperty Source #
Universal quantification. Cf. forAll
.
forAllShrink :: (Show a, STestable prop) => Gen a -> (a -> [a]) -> (a -> prop) -> SProperty Source #
Universal quantification with shrinking.
Cf. forAllShrink
.
Miscellaneous
inventQCGen :: a -> QCGen Source #
inventQCGen
invokes newQCGen
via
unsafePerformIO
. It is useful in connection with the
quickCheck
family of functions.
Constructors
Fun (a :-> b, b, Shrunk) (a -> b) |
class CoArbitrary a where #
Minimal complete definition
Nothing
Methods
coarbitrary :: a -> Gen b -> Gen b #
Instances
class Arbitrary2 (f :: Type -> Type -> Type) where #
Minimal complete definition
Methods
liftArbitrary2 :: Gen a -> Gen b -> Gen (f a b) #
liftShrink2 :: (a -> [a]) -> (b -> [b]) -> f a b -> [f a b] #
Instances
Arbitrary2 Either | |
Defined in Test.QuickCheck.Arbitrary Methods liftArbitrary2 :: Gen a -> Gen b -> Gen (Either a b) # liftShrink2 :: (a -> [a]) -> (b -> [b]) -> Either a b -> [Either a b] # | |
Arbitrary2 (,) | |
Defined in Test.QuickCheck.Arbitrary Methods liftArbitrary2 :: Gen a -> Gen b -> Gen (a, b) # liftShrink2 :: (a -> [a]) -> (b -> [b]) -> (a, b) -> [(a, b)] # | |
Arbitrary2 (Const :: Type -> Type -> Type) | |
Defined in Test.QuickCheck.Arbitrary Methods liftArbitrary2 :: Gen a -> Gen b -> Gen (Const a b) # liftShrink2 :: (a -> [a]) -> (b -> [b]) -> Const a b -> [Const a b] # | |
Arbitrary2 (Constant :: Type -> Type -> Type) | |
Defined in Test.QuickCheck.Arbitrary Methods liftArbitrary2 :: Gen a -> Gen b -> Gen (Constant a b) # liftShrink2 :: (a -> [a]) -> (b -> [b]) -> Constant a b -> [Constant a b] # |
class Arbitrary1 (f :: Type -> Type) where #
Minimal complete definition
Instances
Minimal complete definition
Instances
newtype PrintableString #
Constructors
PrintableString | |
Fields |
Instances
Arbitrary PrintableString | |
Defined in Test.QuickCheck.Modifiers | |
Read PrintableString | |
Defined in Test.QuickCheck.Modifiers | |
Show PrintableString | |
Defined in Test.QuickCheck.Modifiers | |
Eq PrintableString | |
Defined in Test.QuickCheck.Modifiers Methods (==) :: PrintableString -> PrintableString -> Bool Source # (/=) :: PrintableString -> PrintableString -> Bool Source # | |
Ord PrintableString | |
Defined in Test.QuickCheck.Modifiers Methods compare :: PrintableString -> PrintableString -> Ordering Source # (<) :: PrintableString -> PrintableString -> Bool Source # (<=) :: PrintableString -> PrintableString -> Bool Source # (>) :: PrintableString -> PrintableString -> Bool Source # (>=) :: PrintableString -> PrintableString -> Bool Source # max :: PrintableString -> PrintableString -> PrintableString Source # min :: PrintableString -> PrintableString -> PrintableString Source # |
newtype UnicodeString #
Constructors
UnicodeString | |
Fields |
Instances
Arbitrary UnicodeString | |
Defined in Test.QuickCheck.Modifiers | |
Read UnicodeString | |
Defined in Test.QuickCheck.Modifiers | |
Show UnicodeString | |
Defined in Test.QuickCheck.Modifiers | |
Eq UnicodeString | |
Defined in Test.QuickCheck.Modifiers Methods (==) :: UnicodeString -> UnicodeString -> Bool Source # (/=) :: UnicodeString -> UnicodeString -> Bool Source # | |
Ord UnicodeString | |
Defined in Test.QuickCheck.Modifiers Methods compare :: UnicodeString -> UnicodeString -> Ordering Source # (<) :: UnicodeString -> UnicodeString -> Bool Source # (<=) :: UnicodeString -> UnicodeString -> Bool Source # (>) :: UnicodeString -> UnicodeString -> Bool Source # (>=) :: UnicodeString -> UnicodeString -> Bool Source # max :: UnicodeString -> UnicodeString -> UnicodeString Source # min :: UnicodeString -> UnicodeString -> UnicodeString Source # |
newtype ASCIIString #
Constructors
ASCIIString | |
Fields |
Instances
Arbitrary ASCIIString | |
Defined in Test.QuickCheck.Modifiers | |
Read ASCIIString | |
Defined in Test.QuickCheck.Modifiers | |
Show ASCIIString | |
Defined in Test.QuickCheck.Modifiers | |
Eq ASCIIString | |
Defined in Test.QuickCheck.Modifiers Methods (==) :: ASCIIString -> ASCIIString -> Bool Source # (/=) :: ASCIIString -> ASCIIString -> Bool Source # | |
Ord ASCIIString | |
Defined in Test.QuickCheck.Modifiers Methods compare :: ASCIIString -> ASCIIString -> Ordering Source # (<) :: ASCIIString -> ASCIIString -> Bool Source # (<=) :: ASCIIString -> ASCIIString -> Bool Source # (>) :: ASCIIString -> ASCIIString -> Bool Source # (>=) :: ASCIIString -> ASCIIString -> Bool Source # max :: ASCIIString -> ASCIIString -> ASCIIString Source # min :: ASCIIString -> ASCIIString -> ASCIIString Source # |
class ShrinkState s a where #
Constructors
Shrinking s a |
Constructors
Shrink2 | |
Fields
|
Instances
Instances
Instances
newtype NonPositive a #
Constructors
NonPositive | |
Fields
|
Instances
newtype NonNegative a #
Constructors
NonNegative | |
Fields
|
Instances
Constructors
NonZero | |
Fields
|
Instances
Functor NonZero | |
(Num a, Eq a, Arbitrary a) => Arbitrary (NonZero a) | |
Enum a => Enum (NonZero a) | |
Defined in Test.QuickCheck.Modifiers Methods succ :: NonZero a -> NonZero a Source # pred :: NonZero a -> NonZero a Source # toEnum :: Int -> NonZero a Source # fromEnum :: NonZero a -> Int Source # enumFrom :: NonZero a -> [NonZero a] Source # enumFromThen :: NonZero a -> NonZero a -> [NonZero a] Source # enumFromTo :: NonZero a -> NonZero a -> [NonZero a] Source # enumFromThenTo :: NonZero a -> NonZero a -> NonZero a -> [NonZero a] Source # | |
Read a => Read (NonZero a) | |
Show a => Show (NonZero a) | |
Eq a => Eq (NonZero a) | |
Ord a => Ord (NonZero a) | |
Defined in Test.QuickCheck.Modifiers |
Constructors
Negative | |
Fields
|
Instances
Functor Negative | |
(Num a, Ord a, Arbitrary a) => Arbitrary (Negative a) | |
Enum a => Enum (Negative a) | |
Defined in Test.QuickCheck.Modifiers Methods succ :: Negative a -> Negative a Source # pred :: Negative a -> Negative a Source # toEnum :: Int -> Negative a Source # fromEnum :: Negative a -> Int Source # enumFrom :: Negative a -> [Negative a] Source # enumFromThen :: Negative a -> Negative a -> [Negative a] Source # enumFromTo :: Negative a -> Negative a -> [Negative a] Source # enumFromThenTo :: Negative a -> Negative a -> Negative a -> [Negative a] Source # | |
Read a => Read (Negative a) | |
Show a => Show (Negative a) | |
Eq a => Eq (Negative a) | |
Ord a => Ord (Negative a) | |
Defined in Test.QuickCheck.Modifiers Methods compare :: Negative a -> Negative a -> Ordering Source # (<) :: Negative a -> Negative a -> Bool Source # (<=) :: Negative a -> Negative a -> Bool Source # (>) :: Negative a -> Negative a -> Bool Source # (>=) :: Negative a -> Negative a -> Bool Source # |
Constructors
Positive | |
Fields
|
Instances
Functor Positive | |
(Num a, Ord a, Arbitrary a) => Arbitrary (Positive a) | |
Enum a => Enum (Positive a) | |
Defined in Test.QuickCheck.Modifiers Methods succ :: Positive a -> Positive a Source # pred :: Positive a -> Positive a Source # toEnum :: Int -> Positive a Source # fromEnum :: Positive a -> Int Source # enumFrom :: Positive a -> [Positive a] Source # enumFromThen :: Positive a -> Positive a -> [Positive a] Source # enumFromTo :: Positive a -> Positive a -> [Positive a] Source # enumFromThenTo :: Positive a -> Positive a -> Positive a -> [Positive a] Source # | |
Read a => Read (Positive a) | |
Show a => Show (Positive a) | |
Eq a => Eq (Positive a) | |
Ord a => Ord (Positive a) | |
Defined in Test.QuickCheck.Modifiers Methods compare :: Positive a -> Positive a -> Ordering Source # (<) :: Positive a -> Positive a -> Bool Source # (<=) :: Positive a -> Positive a -> Bool Source # (>) :: Positive a -> Positive a -> Bool Source # (>=) :: Positive a -> Positive a -> Bool Source # |
newtype SortedList a #
Instances
data InfiniteList a #
Constructors
InfiniteList | |
Fields
|
Instances
Arbitrary a => Arbitrary (InfiniteList a) | |
Defined in Test.QuickCheck.Modifiers | |
Show a => Show (InfiniteList a) | |
Defined in Test.QuickCheck.Modifiers |
newtype NonEmptyList a #
Constructors
NonEmpty | |
Fields
|
Instances
newtype OrderedList a #
Constructors
Ordered | |
Fields
|
Instances
Instances
Instances
Minimal complete definition
Nothing
Instances
Constructors
Discard |
Instances
Testable Discard | |
Defined in Test.QuickCheck.Property |
Constructors
Success | |
GaveUp | |
Failure | |
Fields
| |
NoExpectedFailure | |
Constructors
Args | |
Fields
|
chooseEnum :: Enum a => (a, a) -> Gen a #
chooseBoundedIntegral :: (Bounded a, Integral a) => (a, a) -> Gen a #
suchThatMap :: Gen a -> (a -> Maybe b) -> Gen b #
growingElements :: [a] -> Gen a #
infiniteListOf :: Gen a -> Gen [a] #
arbitrary1 :: (Arbitrary1 f, Arbitrary a) => Gen (f a) #
shrink1 :: (Arbitrary1 f, Arbitrary a) => f a -> [f a] #
arbitrary2 :: (Arbitrary2 f, Arbitrary a, Arbitrary b) => Gen (f a b) #
shrink2 :: (Arbitrary2 f, Arbitrary a, Arbitrary b) => f a b -> [f a b] #
genericShrink :: (Generic a, RecursivelyShrink (Rep a), GSubterms (Rep a) a) => a -> [a] #
recursivelyShrink :: (Generic a, RecursivelyShrink (Rep a)) => a -> [a] #
shrinkList :: (a -> [a]) -> [a] -> [[a]] #
applyArbitrary2 :: (Arbitrary a, Arbitrary b) => (a -> b -> r) -> Gen r #
applyArbitrary4 :: (Arbitrary a, Arbitrary b, Arbitrary c, Arbitrary d) => (a -> b -> c -> d -> r) -> Gen r #
arbitrarySizedIntegral :: Integral a => Gen a #
arbitrarySizedNatural :: Integral a => Gen a #
arbitrarySizedFractional :: Fractional a => Gen a #
arbitraryBoundedIntegral :: (Bounded a, Integral a) => Gen a #
arbitraryBoundedRandom :: (Bounded a, Random a) => Gen a #
arbitraryBoundedEnum :: (Bounded a, Enum a) => Gen a #
arbitrarySizedBoundedIntegral :: (Bounded a, Integral a) => Gen a #
shrinkNothing :: a -> [a] #
shrinkMapBy :: (a -> b) -> (b -> a) -> (a -> [a]) -> b -> [b] #
shrinkIntegral :: Integral a => a -> [a] #
shrinkBoundedEnum :: (Bounded a, Enum a, Eq a) => a -> [a] #
shrinkRealFrac :: RealFrac a => a -> [a] #
shrinkDecimal :: RealFrac a => a -> [a] #
coarbitraryIntegral :: Integral a => a -> Gen b -> Gen b #
coarbitraryReal :: Real a => a -> Gen b -> Gen b #
coarbitraryShow :: Show a => a -> Gen b -> Gen b #
coarbitraryEnum :: Enum a => a -> Gen b -> Gen b #
orderedList :: (Ord a, Arbitrary a) => Gen [a] #
infiniteList :: Arbitrary a => Gen [a] #
functionBoundedEnum :: (Eq a, Bounded a, Enum a) => (a -> b) -> a :-> b #
functionRealFrac :: RealFrac a => (a -> b) -> a :-> b #
functionIntegral :: Integral a => (a -> b) -> a :-> b #
functionShow :: (Show a, Read a) => (a -> c) -> a :-> c #
functionVoid :: (forall b. void -> b) -> void :-> c #
functionMap :: Function b => (a -> b) -> (b -> a) -> (a -> c) -> a :-> c #
ioProperty :: Testable prop => IO prop -> Property #
idempotentIOProperty :: Testable prop => IO prop -> Property #
verboseShrinking :: Testable prop => prop -> Property #
withMaxSuccess :: Testable prop => Int -> prop -> Property #
checkCoverage :: Testable prop => prop -> Property #
checkCoverageWith :: Testable prop => Confidence -> prop -> Property #
coverTable :: Testable prop => String -> [(String, Double)] -> prop -> Property #
discardAfter :: Testable prop => Int -> prop -> Property #
forAllShow :: Testable prop => Gen a -> (a -> String) -> (a -> prop) -> Property #
forAllBlind :: Testable prop => Gen a -> (a -> prop) -> Property #
forAllShrinkShow :: Testable prop => Gen a -> (a -> [a]) -> (a -> String) -> (a -> prop) -> Property #
forAllShrinkBlind :: Testable prop => Gen a -> (a -> [a]) -> (a -> prop) -> Property #
verboseCheck :: Testable prop => prop -> IO () #
verboseCheckWith :: Testable prop => Args -> prop -> IO () #
verboseCheckResult :: Testable prop => prop -> IO Result #
verboseCheckWithResult :: Testable prop => Args -> prop -> IO Result #
polyQuickCheck :: Name -> ExpQ #
polyVerboseCheck :: Name -> ExpQ #
monomorphic :: Name -> ExpQ #
forAllProperties :: Q Exp #
allProperties :: Q Exp #
quickCheckAll :: Q Exp #
verboseCheckAll :: Q Exp #
labelledExamples :: Testable prop => prop -> IO () #
labelledExamplesWith :: Testable prop => Args -> prop -> IO () #
labelledExamplesResult :: Testable prop => prop -> IO Result #
labelledExamplesWithResult :: Testable prop => Args -> prop -> IO Result #