Skip to content

Commit 0fe494a

Browse files
Fix warnings revealed by v0.14.1 PS release; export functions (#125)
* Fix warnings revealed by v0.14.1 PS release; export functions Exported functions: - enum - randomSampleOne * Update changelog
1 parent 7db589b commit 0fe494a

File tree

2 files changed

+5
-1
lines changed

2 files changed

+5
-1
lines changed

CHANGELOG.md

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -7,10 +7,12 @@ Notable changes to this project are documented in this file. The format is based
77
Breaking changes:
88

99
New features:
10+
- Export `enum` and `randomSampleOne` (#125 by @JordanMartinez)
1011

1112
Bugfixes:
1213

1314
Other improvements:
15+
- Fix warning revealed by v0.14.1 PS release (#125 by @JordanMartinez)
1416

1517
## [v7.0.0](https://github.com/purescript/purescript-quickcheck/releases/tag/v7.0.0) - 2021-02-26
1618

src/Test/QuickCheck/Gen.purs

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,6 +17,7 @@ module Test.QuickCheck.Gen
1717
, frequency
1818
, arrayOf
1919
, arrayOf1
20+
, enum
2021
, listOf
2122
, vectorOf
2223
, elements
@@ -28,6 +29,7 @@ module Test.QuickCheck.Gen
2829
, sample
2930
, randomSample
3031
, randomSample'
32+
, randomSampleOne
3133
) where
3234

3335
import Prelude
@@ -164,7 +166,7 @@ frequency :: forall a. NonEmptyList (Tuple Number (Gen a)) -> Gen a
164166
frequency = NEL.uncons >>> \{ head: x, tail: xs } -> let
165167
xxs = Cons x xs
166168
total = unwrap $ fold (map (Additive <<< fst) xxs :: List (Additive Number))
167-
pick n d Nil = d
169+
pick _ d Nil = d
168170
pick n d (Cons (Tuple k x') xs') = if n <= k then x' else pick (n - k) d xs'
169171
in do
170172
n <- choose zero total

0 commit comments

Comments
 (0)