Skip to content

Commit

Permalink
Implement all combinators in terms of toGenT / fromGenT
Browse files Browse the repository at this point in the history
  • Loading branch information
jacobstanley committed Apr 28, 2019
1 parent e945326 commit cc9c3d1
Show file tree
Hide file tree
Showing 6 changed files with 130 additions and 353 deletions.
2 changes: 1 addition & 1 deletion hedgehog-quickcheck/src/Hedgehog/Gen/QuickCheck.hs
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ import qualified Test.QuickCheck.Random as QuickCheck

seedQCGen :: MonadGen m => m QuickCheck.QCGen
seedQCGen =
QuickCheck.mkQCGen <$> Gen.lift (Gen.integral_ Range.constantBounded)
QuickCheck.mkQCGen <$> fromGenT (Gen.integral_ Range.constantBounded)

-- | Create a Hedgehog 'Gen' from a QuickCheck 'QuickCheck.Gen'.
--
Expand Down
4 changes: 2 additions & 2 deletions hedgehog/src/Hedgehog.hs
Original file line number Diff line number Diff line change
Expand Up @@ -56,8 +56,6 @@ module Hedgehog (

, forAll
, forAllWith
, classify
, cover
, discard

, check
Expand Down Expand Up @@ -112,6 +110,8 @@ module Hedgehog (
, evalExceptT

-- * Coverage
, classify
, cover
, label
, collect

Expand Down
5 changes: 1 addition & 4 deletions hedgehog/src/Hedgehog/Gen.hs
Original file line number Diff line number Diff line change
@@ -1,9 +1,6 @@
module Hedgehog.Gen (
-- * Combinators
lift

-- ** Shrinking
, shrink
shrink
, prune

-- ** Size
Expand Down
Loading

0 comments on commit cc9c3d1

Please sign in to comment.