File tree Expand file tree Collapse file tree 3 files changed +9
-9
lines changed
Expand file tree Collapse file tree 3 files changed +9
-9
lines changed Original file line number Diff line number Diff line change 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
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
Original file line number Diff line number Diff line change 1414 ],
1515 "dependencies" : {
1616 "purescript-random" : " *" ,
17- "purescript-exceptions" : " * "
17+ "purescript-exceptions" : " 0.2.0 "
1818 }
1919}
Original file line number Diff line number Diff 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
9393quickCheck' :: forall prop . (Testable prop ) => Number -> prop -> QC Unit
9494quickCheck' 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
You can’t perform that action at this time.
0 commit comments