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

Moduletasty-hedgehog-1.4.0.2Haskell2010

Test.Tasty.Hedgehog

This package lets you test Hedgehog properties with tasty.

Typical usage would look like this:

testGroup "tasty-hedgehog tests" [
   testPropertyNamed "reverse involutive" "prop_reverse_involutive" prop_reverse_involutive
 , testPropertyNamed "sort idempotent"    "prop_sort_idempotent"    prop_sort_idempotent
 ]
  • 6 types
  • 3 values

testPropertyNamed testName propertyName property creates a TestTree from property using testName as the displayed description for the property. The propertyName is used by Hedgehog when a failure occurs to provide instructions for how to re-run the property and should normally be set to a string representation of the property argument.

testPropertyNamed
 "reverse is involutive"
 "prop_reverse_involutive"
 prop_reverse_involutive

Options you can pass in via tasty

6 declarations
newtypenewtype HedgehogTestLimit
#

The number of successful test cases required before Hedgehog will pass a test

Instances4Eq, Ord, Show, IsOption
newtypenewtype HedgehogDiscardLimit
#

The number of discarded cases allowed before Hedgehog will fail a test

Instances4Eq, Ord, Show, IsOption
newtypenewtype HedgehogShrinkLimit
#

The number of shrinks allowed before Hedgehog will fail a test

Instances4Eq, Ord, Show, IsOption
newtypenewtype HedgehogShrinkRetries
#

The number of times to re-run a test during shrinking

Instances4Eq, Ord, Show, IsOption