HORIZON HASKELLDocslts/ghc-9.10.x248f8f02026-10-05Search names, modules, packages, or :: a typeCtrl K

GHC 9.10.3 · lts/ghc-9.10.x · 248f8f0 · 2026-10-05

Modulegenvalidity-sydtest-1.0.0.0Haskell2010

Test.Syd.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)