Safe Haskell | None |
---|---|
Language | Haskell2010 |
Efficient size-based search for values satisfying/falsifying a lazy boolean predicate. See Control.Enumerable for defining enumerations of data types.
- search :: (Enumerable a, Coolean cool) => Int -> (a -> cool) -> IO [a]
- sat :: (Enumerable a, Coolean cool) => Int -> (a -> cool) -> Bool
- searchRaw :: (Enumerable a, Coolean cool) => Int -> (a -> cool) -> IO [(Bool, a)]
- usearch :: Enumerable a => Int -> (a -> Bool) -> [a]
- test :: (Coolean cool, Enumerable a, Show a) => (a -> cool) -> IO ()
- testTime :: (Coolean cool, Enumerable a, Show a) => Int -> (a -> cool) -> IO ()
- data Options
- sat' :: (Enumerable a, Coolean cool) => Options -> Int -> (a -> cool) -> Bool
- search' :: (Enumerable a, Coolean cool) => Options -> Int -> (a -> cool) -> IO [a]
- searchRaw' :: (Enumerable a, Coolean cool) => Options -> Int -> (a -> cool) -> IO [(Bool, a)]
- test' :: (Coolean cool, Enumerable a, Show a) => Options -> (a -> cool) -> IO ()
- data Cool
- class Coolean b
- (&&&) :: (Coolean a, Coolean b) => a -> b -> Cool
- (|||) :: (Coolean a, Coolean b) => a -> b -> Cool
- (==>) :: (Coolean a, Coolean b) => a -> b -> Cool
- nott :: Coolean a => a -> Cool
- true :: Cool
- false :: Cool
- module Control.Enumerable
Searching
search :: (Enumerable a, Coolean cool) => Int -> (a -> cool) -> IO [a] Source #
Lazily finds all values of or below a given size that satisfies this predicate.
sat :: (Enumerable a, Coolean cool) => Int -> (a -> cool) -> Bool Source #
Is there a value of or below a given size that satisfies this predicate?
searchRaw :: (Enumerable a, Coolean cool) => Int -> (a -> cool) -> IO [(Bool, a)] Source #
Lazily finds all values isomorphic to p (w.r.t. laziness) and returns them along with the result of p.
usearch :: Enumerable a => Int -> (a -> Bool) -> [a] Source #
Unsafe search, the order in which values are found is non-deterministic for some predicates.
Testing properties
test :: (Coolean cool, Enumerable a, Show a) => (a -> cool) -> IO () Source #
SmallCheck-like test driver. Tests a property with gradually increasing sizes until a conunterexample is found.
testTime :: (Coolean cool, Enumerable a, Show a) => Int -> (a -> cool) -> IO () Source #
Stop testing after a given number of seconds
Options for parallel conjunction
Options for parallel conjunction strategies
searchRaw' :: (Enumerable a, Coolean cool) => Options -> Int -> (a -> cool) -> IO [(Bool, a)] Source #
Deep embedded boolean type
Concurrent booleans. Writing properties with the Cool data type often yields faster searches compared to Bool.
Provides better interoperability between Bool and Cool by overloading operators.
Re-exported
module Control.Enumerable