# Test/QuickCheck/Property/Generic.hs

+-- | Generic properties of functions

+module Test.QuickCheck.Property.Generic (

+import Test.QuickCheck.Property.Utils

+-- | Test that relation is reflective.

+prop_Reflexive :: (a -> a -> Bool) -> T a -> a -> Bool

+prop_Reflexive f T x = f x x

+-- | Test that function is associative

+prop_Associative :: (a -> a -> a) -> T a -> a -> a -> a -> Equal a

+prop_Associative (<>) T a b c = ((a <> b) <> c) `Equal` (a <> (b <> c))

+-- | Test that value is a left identity

+prop_LeftIdentity :: a -- ^ Left identity

+ -> (a -> a -> a) -- ^ Function

+prop_LeftIdentity e (<>) T x = (e <> x) `Equal` x

+-- | Test that value is a left identity

+prop_RightIdentity :: a -- ^ Right identity

+ -> (a -> a -> a) -- ^ Function

+prop_RightIdentity e (<>) T x = (e <> x) `Equal` x