HORIZON HASKELLDocslts/ghc-9.10.xc74966e2026-09-27Search names, modules, packages, or :: a typeCtrl K

GHC 9.10.3 · lts/ghc-9.10.x · c74966e · 2026-09-27

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)