genvalidity-property-0.0.0.0: Standard properties for functions on `Validity` types

Safe HaskellNone
LanguageHaskell2010

Test.Validity.Functions.Idempotence

Description

Standard tests involving validity

Synopsis

Documentation

idempotentOnGen :: (Show a, Eq a) => (a -> a) -> Gen a -> Property Source #

idempotentOnValid :: (Show a, Eq a, GenValid a) => (a -> a) -> Property Source #

idempotent :: (Show a, Eq a, GenUnchecked a) => (a -> a) -> Property Source #

idempotentOnArbitrary :: (Show a, Eq a, Arbitrary a) => (a -> a) -> Property Source #

id is idempotent for any type:

idempotentOnArbitrary (id :: Int -> Int)

const, given any input, is idempotent for any type as well:

\int -> idempotentOnArbitrary (const int :: Int -> Int)