Skip to content

Commit 3e46bda

Browse files
committed
Merge pull request #28 from purescript/eff
Fix issue with instance selection in PSCi.
2 parents 0401a18 + 5444e46 commit 3e46bda

File tree

2 files changed

+5
-4
lines changed

2 files changed

+5
-4
lines changed

pursuit.json

Lines changed: 1 addition & 0 deletions
Large diffs are not rendered by default.

src/Test/QuickCheck.purs

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -30,18 +30,18 @@ import Test.QuickCheck.Gen
3030
import 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
4040
quickCheck 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
4545
quickCheck' 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

Comments
 (0)