@@ -30,18 +30,18 @@ import Test.QuickCheck.Gen
3030import Test.QuickCheck.LCG
3131
3232-- | 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
3434
3535-- | Test a property.
3636-- |
3737-- | This function generates a new random seed, runs 100 tests and
3838-- | 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
4040quickCheck prop = quickCheck' 100 prop
4141
4242-- | A variant of the `quickCheck` function which accepts an extra parameter
4343-- | 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
4545quickCheck' n prop = do
4646 seed <- randomSeed
4747 let results = quickCheckPure seed n prop
@@ -51,7 +51,7 @@ quickCheck' n prop = do
5151
5252 where
5353
54- throwOnFirstFailure :: Int -> List Result -> QC Unit
54+ throwOnFirstFailure :: Int -> List Result -> QC eff Unit
5555 throwOnFirstFailure _ Nil = return unit
5656 throwOnFirstFailure n (Cons (Failed msg) _) = throwException $ error $ " Test " ++ show n ++ " failed: \n " ++ msg
5757 throwOnFirstFailure n (Cons _ rest) = throwOnFirstFailure (n + one) rest
0 commit comments