Skip to content

Commit 9d0b7f2

Browse files
committed
update docs
1 parent c0e7e7c commit 9d0b7f2

File tree

2 files changed

+34
-12
lines changed

2 files changed

+34
-12
lines changed

README.md

Lines changed: 9 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -85,6 +85,10 @@
8585

8686
instance coarbTuple :: (CoArbitrary a, CoArbitrary b) => CoArbitrary (Tuple a b)
8787

88+
instance monoidResult :: Monoid Result
89+
90+
instance semigroupResult :: Semigroup Result
91+
8892
instance showResult :: Show Result
8993

9094
instance testableBoolean :: Testable Boolean
@@ -102,11 +106,15 @@
102106

103107
quickCheck' :: forall prop. (Testable prop) => Number -> prop -> QC Unit
104108

105-
quickCheckPure :: forall prop. (Testable prop) => Number -> Number -> prop -> [Result]
109+
quickCheckPure :: forall prop. (Testable prop) => Number -> Seed -> prop -> [Result]
106110

107111
smallCheck :: forall prop. (Testable prop) => prop -> QC Unit
108112

109113
smallCheckPure :: forall prop. (Testable prop) => Number -> prop -> [Result]
110114

115+
statCheck :: forall prop. (Testable prop) => Number -> prop -> QC Unit
116+
117+
statCheckPure :: forall prop. (Testable prop) => Seed -> Number -> prop -> Result
118+
111119

112120

src/Test/QuickCheck/README.md

Lines changed: 25 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -10,18 +10,22 @@
1010
GenOut :: { value :: a, state :: GenState } -> GenOut a
1111

1212
data GenState where
13-
GenState :: { size :: Number, seed :: Number } -> GenState
13+
GenState :: { size :: Size, seed :: Seed } -> GenState
1414

1515
data GenT f a where
1616
GenT :: Mealy.MealyT f GenState (GenOut a) -> GenT f a
1717

18-
type LCG = Number
18+
type Seed = Number
1919

2020
type Size = Number
2121

2222

2323
### Type Class Instances
2424

25+
instance altGenT :: (Monad f) => Alt (GenT f)
26+
27+
instance alternativeGenT :: (Monad f) => Alternative (GenT f)
28+
2529
instance applicativeGenT :: (Monad f) => Applicative (GenT f)
2630

2731
instance applyGenOut :: Apply GenOut
@@ -36,12 +40,16 @@
3640

3741
instance monadGenT :: (Monad f) => Monad (GenT f)
3842

43+
instance monadPlusGenT :: (Monad f) => MonadPlus (GenT f)
44+
3945
instance monoidGenOut :: (Monoid a) => Monoid (GenOut a)
4046

4147
instance monoidGenState :: Monoid GenState
4248

4349
instance monoidGenT :: (Monad f) => Monoid (GenT f a)
4450

51+
instance plusGenT :: (Monad f) => Plus (GenT f)
52+
4553
instance semigroupGenOut :: (Semigroup a) => Semigroup (GenOut a)
4654

4755
instance semigroupGenState :: Semigroup GenState
@@ -51,6 +59,10 @@
5159

5260
### Values
5361

62+
allInArray :: forall f a. (Monad f) => [a] -> GenT f a
63+
64+
allInRange :: forall f a. (Monad f) => Number -> Number -> GenT f Number
65+
5466
arrayOf :: forall f a. (Monad f) => GenT f a -> GenT f [a]
5567

5668
arrayOf1 :: forall f a. (Monad f) => GenT f a -> GenT f (Tuple a [a])
@@ -61,10 +73,6 @@
6173

6274
collectAll :: forall f a. (Monad f) => GenState -> GenT f a -> f [a]
6375

64-
detArray :: forall f a. (Monad f) => [a] -> GenT f a
65-
66-
detRange :: forall f a. (Monad f) => Number -> Number -> GenT f Number
67-
6876
dropGen :: forall f a. (Monad f) => Number -> GenT f a -> GenT f a
6977

7078
elements :: forall f a. (Monad f) => a -> [a] -> GenT f a
@@ -73,17 +81,23 @@
7381

7482
foldGen :: forall f a b. (Monad f) => (b -> a -> Maybe b) -> b -> GenState -> GenT f a -> f b
7583

84+
foldGen' :: forall f a b. (Monad f) => (b -> a -> Maybe b) -> b -> GenState -> GenT f a -> f (Tuple b (GenT f a))
85+
7686
frequency :: forall f a. (Monad f) => Tuple Number (GenT f a) -> [Tuple Number (GenT f a)] -> GenT f a
7787

7888
infinite :: forall f a. (Monad f) => GenT f a -> GenT f a
7989

8090
oneOf :: forall f a. (Monad f) => GenT f a -> [GenT f a] -> GenT f a
8191

92+
perms :: forall f a. (Monad f) => [a] -> GenT f [a]
93+
8294
perturbGen :: forall f a. (Monad f) => Number -> GenT f a -> GenT f a
8395

8496
repeatable :: forall a b. (a -> Gen b) -> Gen (a -> b)
8597

86-
resize :: forall f a. (Monad f) => Number -> GenT f a -> GenT f a
98+
resize :: forall f a. (Monad f) => Size -> GenT f a -> GenT f a
99+
100+
runGen :: forall f a. (Monad f) => Number -> GenState -> GenT f a -> f (Tuple [a] (GenT f a))
87101

88102
sample :: forall f a. (Monad f) => Number -> GenT f a -> f [a]
89103

@@ -93,7 +107,7 @@
93107

94108
showSample' :: forall r a. (Show a) => Number -> Gen a -> Eff (trace :: Trace | r) Unit
95109

96-
sized :: forall f a. (Monad f) => (Number -> GenT f a) -> GenT f a
110+
sized :: forall f a. (Monad f) => (Size -> GenT f a) -> GenT f a
97111

98112
stateful :: forall f a. (Monad f) => (GenState -> GenT f a) -> GenT f a
99113

@@ -103,11 +117,11 @@
103117

104118
takeGen :: forall f a. (Monad f) => Number -> GenT f a -> GenT f a
105119

106-
unfoldGen :: forall f a b c. (Monad f) => (b -> a -> Tuple b (Maybe c)) -> b -> GenT f a -> GenT f c
120+
transGen :: forall f a b c. (Monad f) => (b -> a -> Tuple b (Maybe c)) -> b -> GenT f a -> GenT f c
107121

108-
uniform :: forall f. (Monad f) => GenT f Number
122+
uniform :: forall f. (Monad f) => GenT f Seed
109123

110-
variant :: forall f a. (Monad f) => Number -> GenT f a -> GenT f a
124+
variant :: forall f a. (Monad f) => Seed -> GenT f a -> GenT f a
111125

112126
vectorOf :: forall f a. (Monad f) => Number -> GenT f a -> GenT f [a]
113127

0 commit comments

Comments
 (0)