I am writing a simple test using quickcheck.
import Test.QuickCheck
f :: Int -> Int
f x
| x < 0 = (-x)
| otherwise = x
main = do
putStrLn "Testing"
quickCheck ((\x -> ((f x) >= 0)) :: Int -> Bool)
Whenever I run this via $ runhaskell test.hs
, I see one of 2 different results.
Either I get:
Testing
+++ OK, passed 100 tests.
Or:
I get no output, and the program terminates.
I cannot reason about this behavior.
This is on Quickcheck 2.5.1.1, and ghc 7.4.2.