HORIZON HASKELLDocslts/ghc-10.0.xfc4e5982026-10-11Search names, modules, packages, or :: a typeCtrl K

GHC 10.0.0.20260917 · lts/ghc-10.0.x · fc4e598 · 2026-10-11

Modulegenvalidity-property-1.0.0.0Haskell2010

Test.Validity.Functions.Idempotence

Standard tests involving validity

  • 3 values
valueidempotentOnArbitrary :: (Show a, Eq a, Arbitrary a) => (a -> a) -> Property
#

id is idempotent for any type:

Property
idempotentOnArbitrary (id :: Int -> Int)

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

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