You can run individual spec items that match a given pattern by passing
--match PATTERN to your test driver. The
PATTERN is matched against
/-separated path of the spec item
To understand what exactly this means let's look at an example.
runhaskell Spec.hs Prelude reverse reverses a list FAILED  show shows its argument Failures: Spec.hs:8:7: 1) Prelude.reverse reverses a list To rerun use: --match "/Prelude/reverse/reverses a list/" Randomized with seed 921447365 Finished in 0.0005 seconds 2 examples, 1 failure
This spec contains one failing spec item.
/-separated path of that spec item is:
Prelude/reverse/reverses a list
The pretty-printed path as it appears in the test output is:
Prelude.reverse reverses a list
You can rerun the failing spec item by either matching on the
path or the pretty-printed path. Both of the following options lead to the
runhaskell Spec.hs -m "Prelude/reverse/reverses a list"
runhaskell Spec.hs -m "Prelude.reverse reverses a list"
Or you can match on any substring of one of the above, e.g.:
runhaskell Spec.hs -m reverse
Note: Do not rely on the pretty-printed path for scripting purpose; use the
/-separated path instead!