-- Hoogle documentation, generated by Haddock
-- See Hoogle, http://www.haskell.org/hoogle/
-- | Another lightweight testing library in Haskell.
--
-- SmallCheck is similar to QuickCheck (Claessen and Hughes 2000-) but
-- instead of testing for a sample of randomly generated values,
-- SmallCheck tests properties for all the finitely many values up to
-- some depth, progressively increasing the depth used.
--
-- Folk-law: if there is any case in which a program fails, there is
-- almost always a simple one.
--
-- Corollary: if a program does not fail in any simple case, it almost
-- never fails.
--
-- Other possible sales pitches:
--
--
-- - write test generators for your own types more easily
-- - be sure any counter-examples found are minimal
-- - write properties using existentials as well as universals
-- - establish complete coverage of a defined test-space
-- - display counter-examples of functional type
--
@package smallcheck
@version 0.2.1
module Test.SmallCheck
smallCheck :: (Testable a) => Int -> a -> IO ()
smallCheckI :: (Testable a) => a -> IO ()
depthCheck :: (Testable a) => Int -> a -> IO ()
test :: (Testable a) => a -> IO ()
data Property
class Testable a
forAll :: (Show a, Testable b) => Series a -> (a -> b) -> Property
forAllElem :: (Show a, Testable b) => [a] -> (a -> b) -> Property
exists :: (Serial a, Testable b) => (a -> b) -> Property
existsDeeperBy :: (Serial a, Testable b) => (Int -> Int) -> (a -> b) -> Property
thereExists :: (Testable b) => Series a -> (a -> b) -> Property
thereExistsElem :: (Testable b) => [a] -> (a -> b) -> Property
(==>) :: (Testable a) => Bool -> a -> Property
type Series a = Int -> [a]
class Serial a
series :: (Serial a) => Series a
coseries :: (Serial a, Serial b) => Series (a -> b)
(\/) :: Series a -> Series a -> Series a
(><) :: Series a -> Series b -> Series (a, b)
two :: Series a -> Series (a, a)
three :: Series a -> Series (a, a, a)
four :: Series a -> Series (a, a, a, a)
cons0 :: a -> Series a
cons1 :: (Serial a) => (a -> b) -> Series b
cons2 :: (Serial a, Serial b) => (a -> b -> c) -> Series c
cons3 :: (Serial a, Serial b, Serial c) => (a -> b -> c -> d) -> Series d
cons4 :: (Serial a, Serial b, Serial c, Serial d) => (a -> b -> c -> d -> e) -> Series e
alts0 :: (Serial a) => Series a
alts1 :: (Serial a, Serial b) => Series (a -> b)
alts2 :: (Serial a, Serial b, Serial c) => Series (a -> b -> c)
alts3 :: (Serial a, Serial b, Serial c, Serial d) => Series (a -> b -> c -> d)
alts4 :: (Serial a, Serial b, Serial c, Serial d, Serial e) => Series (a -> b -> c -> d -> e)
newtype N a
N :: a -> N a
type Nat = N Int
type Natural = N Integer
depth :: Int -> Int -> Int
inc :: Int -> Int
dec :: Int -> Int
instance (Testable a) => Testable (IO a)
instance Testable Property
instance (Serial a, Show a, Testable b) => Testable (a -> b)
instance Testable PR
instance Testable Bool
instance (Serial a, Show a, Show b) => Show (a -> b)
instance (Serial a, Serial b) => Serial (a -> b)
instance (Serial a) => Serial [a]
instance (Serial a, Serial b) => Serial (Either a b)
instance (Serial a) => Serial (Maybe a)
instance Serial Bool
instance (Serial a, Serial b, Serial c, Serial d) => Serial (a, b, c, d)
instance (Serial a, Serial b, Serial c) => Serial (a, b, c)
instance (Serial a, Serial b) => Serial (a, b)
instance Serial Char
instance Serial Double
instance Serial Float
instance (Integral a, Serial a) => Serial (N a)
instance (Show a) => Show (N a)
instance Serial Integer
instance Serial Int
instance Serial ()