[Haskell-cafe] Hedgehog - Integrated shrinking, shrinks obey invariants by construction.

John Wiegley johnw at newartisans.com
Fri Jun 15 19:55:23 UTC 2018

>>>>> "LX" == Li-yao Xia <lysxia at gmail.com> writes:

LX> The main drawback might be that there is some duplicated work during
LX> shrinking ((>>=) applies its second argument to different arguments), but
LX> it is quite minor since shrinking is only needed in exceptional cases, and
LX> it usually terminates in few steps.

I've recently switched from QuickCheck to Hedgehog for my property testing,
and having found that the implied shrinking is indeed a very nice behavior.
Shrinking is one of those principled ideas that rarely happens in execution,
so any methodology for automating it is appreciated.

John Wiegley                  GPG fingerprint = 4710 CF98 AF9B 327B B80F
http://newartisans.com                          60E1 46C4 BD1A 7AC1 4BA2

More information about the Haskell-Cafe mailing list