@@ -30,18 +30,18 @@ import Test.QuickCheck.Gen
30
30
import Test.QuickCheck.LCG
31
31
32
32
-- | A type synonym which represents the effects used by the `quickCheck` function.
33
- type QC a = forall eff . Eff (console :: CONSOLE , random :: RANDOM , err :: EXCEPTION | eff ) a
33
+ type QC eff a = Eff (console :: CONSOLE , random :: RANDOM , err :: EXCEPTION | eff ) a
34
34
35
35
-- | Test a property.
36
36
-- |
37
37
-- | This function generates a new random seed, runs 100 tests and
38
38
-- | prints the test results to the console.
39
- quickCheck :: forall prop . (Testable prop ) => prop -> QC Unit
39
+ quickCheck :: forall eff prop . (Testable prop ) => prop -> QC eff Unit
40
40
quickCheck prop = quickCheck' 100 prop
41
41
42
42
-- | A variant of the `quickCheck` function which accepts an extra parameter
43
43
-- | representing the number of tests which should be run.
44
- quickCheck' :: forall prop . (Testable prop ) => Int -> prop -> QC Unit
44
+ quickCheck' :: forall eff prop . (Testable prop ) => Int -> prop -> QC eff Unit
45
45
quickCheck' n prop = do
46
46
seed <- randomSeed
47
47
let results = quickCheckPure seed n prop
@@ -51,7 +51,7 @@ quickCheck' n prop = do
51
51
52
52
where
53
53
54
- throwOnFirstFailure :: Int -> List Result -> QC Unit
54
+ throwOnFirstFailure :: Int -> List Result -> QC eff Unit
55
55
throwOnFirstFailure _ Nil = return unit
56
56
throwOnFirstFailure n (Cons (Failed msg) _) = throwException $ error $ " Test " ++ show n ++ " failed: \n " ++ msg
57
57
throwOnFirstFailure n (Cons _ rest) = throwOnFirstFailure (n + one) rest
0 commit comments