Skip to content

Commit af98f14

Browse files
committed
Update for new exceptions
1 parent 9331f80 commit af98f14

File tree

3 files changed

+9
-9
lines changed

3 files changed

+9
-9
lines changed

README.md

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@
44

55
### Types
66

7-
type QC a = forall eff. Eff (err :: Exception String, random :: Random, trace :: Trace | eff) a
7+
type QC a = forall eff. Eff (err :: Exception, random :: Random, trace :: Trace | eff) a
88

99
data Result where
1010
Success :: Result
@@ -27,23 +27,23 @@
2727

2828
instance arbArray :: (Arbitrary a) => Arbitrary [a]
2929

30-
instance arbBoolean :: Arbitrary Prim.Boolean
30+
instance arbBoolean :: Arbitrary Boolean
3131

3232
instance arbFunction :: (CoArbitrary a, Arbitrary b) => Arbitrary (a -> b)
3333

34-
instance arbNumber :: Arbitrary Prim.Number
34+
instance arbNumber :: Arbitrary Number
3535

3636
instance coarbArray :: (CoArbitrary a) => CoArbitrary [a]
3737

38-
instance coarbBoolean :: CoArbitrary Prim.Boolean
38+
instance coarbBoolean :: CoArbitrary Boolean
3939

4040
instance coarbFunction :: (Arbitrary a, CoArbitrary b) => CoArbitrary (a -> b)
4141

42-
instance coarbNumber :: CoArbitrary Prim.Number
42+
instance coarbNumber :: CoArbitrary Number
4343

4444
instance showResult :: Show Result
4545

46-
instance testableBoolean :: Testable Prim.Boolean
46+
instance testableBoolean :: Testable Boolean
4747

4848
instance testableFunction :: (Arbitrary t, Testable prop) => Testable (t -> prop)
4949

bower.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,6 +14,6 @@
1414
],
1515
"dependencies": {
1616
"purescript-random": "*",
17-
"purescript-exceptions": "*"
17+
"purescript-exceptions": "0.2.0"
1818
}
1919
}

src/Test/QuickCheck.purs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -88,7 +88,7 @@ quickCheckPure seed n prop = evalGen (go n) seed
8888
rest <- go (n - 1)
8989
return $ result : rest
9090

91-
type QC a = forall eff. Eff (trace :: Trace, random :: Random, err :: Exception String | eff) a
91+
type QC a = forall eff. Eff (trace :: Trace, random :: Random, err :: Exception | eff) a
9292

9393
quickCheck' :: forall prop. (Testable prop) => Number -> prop -> QC Unit
9494
quickCheck' n prop = do
@@ -102,7 +102,7 @@ quickCheck' n prop = do
102102

103103
throwOnFirstFailure :: Number -> [Result] -> QC Unit
104104
throwOnFirstFailure _ [] = return unit
105-
throwOnFirstFailure n (Failed msg : _) = throwException $ "Test " ++ show n ++ " failed: \n" ++ msg
105+
throwOnFirstFailure n (Failed msg : _) = throwException $ error $ "Test " ++ show n ++ " failed: \n" ++ msg
106106
throwOnFirstFailure n (_ : rest) = throwOnFirstFailure (n + 1) rest
107107

108108
countSuccesses :: [Result] -> Number

0 commit comments

Comments
 (0)