Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
fixing genericCoarbitrary
  • Loading branch information
athanclark committed Mar 3, 2019
commit f33f3b6ea1d476da3639ca7ad6b6428a060874c1
4 changes: 2 additions & 2 deletions src/Test/QuickCheck/Arbitrary.purs
Original file line number Diff line number Diff line change
Expand Up @@ -240,8 +240,8 @@ genericArbitrary :: forall a rep. Generic a rep => Arbitrary rep => Gen a
genericArbitrary = to <$> (arbitrary :: Gen rep)

-- | A `Generic` implementation of the `coarbitrary` member from the `Coarbitrary` type class.
genericCoarbitrary :: forall a rep. Generic a rep => Coarbitrary rep => a -> Gen a -> Gen a
genericCoarbitrary x g = to <$> coarbitrary (from x) (from <$> g)
genericCoarbitrary :: forall a rep t. Generic a rep => Coarbitrary rep => a -> Gen t -> Gen t
genericCoarbitrary x = coarbitrary (from x)

-- | A helper typeclass to implement `Arbitrary` for records.
class ArbitraryRowList list row | list -> row where
Expand Down