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

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

Modulegenvalidity-hspec-1.0.0.4Haskell2010

Test.Validity.Ord

Ord properties

You will need TypeApplications to use these.

  • 3 values
valueordSpecOnGen
  1. :: (Show a, Ord a, Typeable a)
  2. => Gen a
  3. -> String
  4. -> a -> [a]
  5. -> Spec
#

Standard test spec for properties of Ord instances for values generated by a given generator (and name for that generator).

Example usage:

ordSpecOnGen ((* 2) <$> genValid @Int) "even"