Skip to content

Commit eb5a06f

Browse files
committed
Rename LCG module and array functions.
1 parent 7fcb3c1 commit eb5a06f

4 files changed

Lines changed: 14 additions & 166 deletions

File tree

README.md

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -84,7 +84,7 @@
8484
quickCheckPure :: forall prop. (Testable prop) => Number -> Number -> prop -> [Result]
8585

8686

87-
## Module Test.QuickCheck.LCG
87+
## Module Test.QuickCheck.Gen
8888

8989
### Types
9090

@@ -114,6 +114,10 @@
114114

115115
### Values
116116

117+
arrayOf :: forall a. Gen a -> Gen [a]
118+
119+
arrayOf1 :: forall a. Gen a -> Gen (Tuple a [a])
120+
117121
choose :: Number -> Number -> Gen Number
118122

119123
chooseInt :: Number -> Number -> Gen Number
@@ -124,10 +128,6 @@
124128

125129
frequency :: forall a. Tuple Number (Gen a) -> [Tuple Number (Gen a)] -> Gen a
126130

127-
listOf :: forall a. Gen a -> Gen [a]
128-
129-
listOf1 :: forall a. Gen a -> Gen (Tuple a [a])
130-
131131
oneOf :: forall a. Gen a -> [Gen a] -> Gen a
132132

133133
perturbGen :: forall a. Number -> Gen a -> Gen a

src/Test/QuickCheck.purs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@ import qualified Data.Char as S
1515
import qualified Data.String as S
1616
import qualified Data.String.Unsafe as SU
1717

18-
import Test.QuickCheck.LCG
18+
import Test.QuickCheck.Gen
1919

2020
newtype AlphaNumString = AlphaNumString String
2121

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
module Test.QuickCheck.LCG
1+
module Test.QuickCheck.Gen
22
(
33
Gen(),
44
GenState(),
@@ -14,8 +14,8 @@ module Test.QuickCheck.LCG
1414
chooseInt,
1515
oneOf,
1616
frequency,
17-
listOf,
18-
listOf1,
17+
arrayOf,
18+
arrayOf1,
1919
vectorOf,
2020
elements,
2121
runGen,
@@ -84,13 +84,13 @@ frequency x xs = let
8484
n <- chooseInt 1 total
8585
pick n (snd x) xxs
8686

87-
listOf :: forall a. Gen a -> Gen [a]
88-
listOf g = sized $ \n ->
87+
arrayOf :: forall a. Gen a -> Gen [a]
88+
arrayOf g = sized $ \n ->
8989
do k <- chooseInt 0 n
9090
vectorOf k g
9191

92-
listOf1 :: forall a. Gen a -> Gen (Tuple a [a])
93-
listOf1 g = sized $ \n ->
92+
arrayOf1 :: forall a. Gen a -> Gen (Tuple a [a])
93+
arrayOf1 g = sized $ \n ->
9494
do k <- chooseInt 0 n
9595
x <- g
9696
xs <- vectorOf (k - 1) g
@@ -171,4 +171,4 @@ instance bindGen :: Bind Gen where
171171
(>>=) (Gen f) g = Gen $ \s -> case f s of
172172
{ value = value, state = state } -> runGen (g value) state
173173

174-
instance monadGen :: Monad Gen
174+
instance monadGen :: Monad Gen

src/Test/QuickCheck/README.md

Lines changed: 0 additions & 152 deletions
This file was deleted.

0 commit comments

Comments
 (0)