
Hi Hartmut, if I just copy,paste and compile your example it takes less than 0.01s to run the tests. So, probably the problem is not in the code. BTW, I use GHC 7.0.1. Cheers, Daniel. On Fri, 2011-08-12 at 23:31 +0200, Hartmut wrote:
Everyone,
I want to run an QuickCheck on "a most simple" IO monad. When I compile and run :main, it says: ....................................................................................................+++ OK, passed 100 tests. Well, thats fine, since *1 mapped on any Int gives the same Int back. But it lasts 10 seconds (!) for doing those 100 Tests. Something must be wrong?! I'd appreciate your ideas.
Hartmut
module MonadicQuickCheck where
import IO import Random import Test.QuickCheck import Test.QuickCheck.Monadic
main = do quickCheck x
x :: Property x = monadicIO $ do a <- pick arbitrary pre $ not(null a) b <- run $ testfunction a assert $ b == a
testfunction :: [Int] -> IO [Int] testfunction x = do putStr "." return $ map (*1) x
_______________________________________________ Beginners mailing list Beginners@haskell.org http://www.haskell.org/mailman/listinfo/beginners