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

GHC 10.0.0.20260917 · lts/ghc-10.0.x · a889611 · 2026-10-18

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)