-- Hoogle documentation, generated by Haddock -- See Hoogle, http://www.haskell.org/hoogle/ -- | Properties of functions and relations, perhaps for use with quickcheck -- -- Properties of functions and relations, perhaps for use with quickcheck @package props @version 0.1 module Test.Properties -- |
--   f a b == f b a
--   
-- --
--   symmetric (==) :: Int -> Int -> Bool
--   
-- --
--   symmetric (+)  :: Int -> Int -> Bool
--   
symmetric :: Eq b => (t -> t -> b) -> t -> t -> Bool -- | symmetric f a b implies a == b -- --
--   antisymmetric (-) :: Int -> Int -> Bool
--   
antisymmetric :: Eq b => (b -> b -> b) -> b -> b -> Bool -- |
--   a == (g . f) a
--   
-- --
--   inverts pred succ :: Int -> Bool
--   
-- --
--   inverts succ pred :: Char -> Bool
--   
inverts :: Eq b => (b -> b1) -> (b1 -> b) -> b -> Bool -- | a == (f . f) a (alternatively, inverts f f) -- --
--   involutive negate
--   
-- --
--   involutive reverse :: String -> Bool
--   
involutive :: Eq b => (b -> b) -> b -> Bool -- |
--   a <= f a
--   
-- --
--   nonDecreasing id
--   
-- --
--   nonDecreasing (\x -> if even x then x else succ x)
--   
nonDecreasing :: Ord b => (b -> b) -> b -> Bool -- |
--   a < f a
--   
-- --
--   increasing succ :: Int -> Bool
--   
increasing :: Ord b => (b -> b) -> b -> Bool -- | Alias for idempotent fixes :: Eq b => (b -> b) -> b -> Bool -- |
--   f a == f (f a)
--   
-- --
--   idempotent (const "thingy")
--   
-- --
--   idempotent (*0)
--   
-- --
--   idempotent (&& False)
--   
idempotent :: Eq b => (b -> b) -> b -> Bool -- |
--   f e a == a
--   
-- --
--   leftId (+) 0
--   
leftId :: Eq b => (t -> b -> b) -> t -> b -> Bool -- |
--   f a e == a
--   
-- --
--   rightId (+) 0
--   
rightId :: Eq b => (b -> t -> b) -> t -> b -> Bool -- |
--   leftId f e && rightId f e
--   
-- --
--   identity (+) 0
--   
identity :: Eq b => (b -> b -> b) -> b -> b -> Bool -- |
--   f a (f b c) == f (f a b) c
--   
-- --
--   associative (&&)
--   
-- --
--   associative (||)
--   
-- --
--   associative (++)
--   
-- --
--   associative (*)
--   
associative :: Eq b => (b -> b -> b) -> b -> b -> b -> Bool -- | identity f e and associative f a b c -- --
--   monoidal (&&) True
--   
-- --
--   monoidal (||) False
--   
-- --
--   monoidal (++) []
--   
-- --
--   monoidal (*) 1
--   
monoidal :: Eq b => (b -> b -> b) -> b -> b -> b -> b -> Bool -- |
--   eq (f a) == eq (g a)
--   
-- --
--   equalizes even (*2) (*4)
--   
-- --
--   equalizes (const [4]) (take 7) (take 12)
--   
equalizes :: Eq b => (a -> b) -> (t -> a) -> (t -> a) -> t -> Bool eqBy :: Eq b => (a -> b) -> a -> a -> Bool leqBy :: Ord b => (a -> b) -> a -> a -> Bool leBy :: Ord b => (a -> b) -> a -> a -> Bool symmetricBy :: Eq b => (a -> b) -> (t -> t -> a) -> t -> t -> Bool antisymmetricBy :: Eq b => (t -> b) -> (t -> t -> t) -> t -> t -> Bool invertsBy :: Eq b => (a -> b) -> (a -> b1) -> (b1 -> a) -> a -> Bool involutiveBy :: Eq b => (b1 -> b) -> (b1 -> b1) -> b1 -> Bool nonDecreasingBy :: Ord b => (a -> b) -> (a -> a) -> a -> Bool increasingBy :: Ord b => (a -> b) -> (a -> a) -> a -> Bool fixesBy :: Eq b => (a -> b) -> (a -> a) -> a -> Bool idempotentBy :: Eq b => (a -> b) -> (a -> a) -> a -> Bool associativeBy :: Eq b => (a -> b) -> (a -> a -> a) -> a -> a -> a -> Bool monoidalBy :: Eq b => (a -> b) -> (a -> a -> a) -> a -> a -> a -> a -> Bool leftIdBy :: Eq b => (a -> b) -> (t -> a -> a) -> t -> a -> Bool rightIdBy :: Eq b => (a -> b) -> (a -> t -> a) -> t -> a -> Bool identityBy :: Eq b => (t -> b) -> (t -> t -> t) -> t -> t -> Bool