Generic properties of functions
- module Test.QuickCheck.Property.Common
- prop_Reflexive :: (a -> a -> Bool) -> T a -> a -> Bool
- prop_Associative :: (a -> a -> a) -> T a -> a -> a -> a -> Equal a
- prop_Commutative :: (a -> a -> b) -> T (a, b) -> a -> a -> Equal b
- prop_LeftIdentity :: a -> (a -> a -> a) -> T a -> a -> Equal a
- prop_RightIdentity :: a -> (a -> a -> a) -> T a -> a -> Equal a
- prop_Identity :: a -> (a -> a -> a) -> T a -> a -> Equal a
- prop_GroupInverse :: a -> (a -> a -> a) -> (a -> a) -> T a -> a -> Equal a
- prop_GenMonoid :: a -> (a -> a -> a) -> T a -> a -> a -> a -> Equal a
- prop_Group :: a -> (a -> a -> a) -> (a -> a) -> T a -> a -> a -> a -> Equal a
Documentation
General
prop_Reflexive :: (a -> a -> Bool) -> T a -> a -> BoolSource
Test that relation is reflective.
f x x = True
Monoids & group
prop_Associative :: (a -> a -> a) -> T a -> a -> a -> a -> Equal aSource
Test that function is associative
prop_Commutative :: (a -> a -> b) -> T (a, b) -> a -> a -> Equal bSource
Test that function is commutative
Test that value is a left identity
Test that value is a left identity
Test that value is both right and left identity
Test that inverse operation is correct.
General
Test that identity and associative operation satisfy monoid laws.