If your ghci installation has trouble finding QuickCheck even after "cabal install QuickCheck", try "cabal repl --build-depends QuickCheck". This worked for me :)
It might be worth pointing out that the "list of empty tuples" test cases are basically useless even for checking the reverse function as even `dumbReverse x = x` will pass them.
This doesn’t make the lists of empty tuples useless. The reverse function simply has these as fixpoints. The equally dumb function `dumbReverse x = [ ]` doesn‘t pass them, so I don‘t see the point.
Why would quicktest use the empty list 10 times? This makes only sense if the function under test isn't pure, i.e. would use IO, like random numbers or reading a file. Is there a way to call quicktest on a pure function in a way that duplicate test data is avoided?
If your ghci installation has trouble finding QuickCheck even after "cabal install QuickCheck", try "cabal repl --build-depends QuickCheck". This worked for me :)
Fantastic work! This series is
It might be worth pointing out that the "list of empty tuples" test cases are basically useless even for checking the reverse function as even `dumbReverse x = x` will pass them.
This doesn’t make the lists of empty tuples useless. The reverse function simply has these as fixpoints. The equally dumb function `dumbReverse x = [ ]` doesn‘t pass them, so I don‘t see the point.
Why would quicktest use the empty list 10 times?
This makes only sense if the function under test isn't pure, i.e. would use IO, like random numbers or reading a file.
Is there a way to call quicktest on a pure function in a way that duplicate test data is avoided?
Maybe it tries lists of ten different types and each set of those also includes the empty case.
2:34, is the QuickCeck operator this one: ==> ?
Indeed. (==>) is the operator for "conditional properties".