From Test.QuickCheck:
forAll :: (Show a, Testable prop) => Gen a -> (a -> prop) -> Property
Essentially, this allows you to write quickCheck tests without relying on an Arbitrary instance for all of the arguments you need. This would help us avoid the problem of orphan Arbitrary instances. For instance:
quickCheck $ forAll (maps :: Gen (Map Int String))
(\m -> m == Map.fromUnfoldable (Map.toFoldable m))
or something. Then, we are free to put Gen values for any type anywhere, without all the newtype shenanigans. We can also freely parameterize Gen values based on other values that are only available at runtime, etc etc. I'm sure I've complained about these aspects of type classes before. ;)
From
Test.QuickCheck:Essentially, this allows you to write quickCheck tests without relying on an
Arbitraryinstance for all of the arguments you need. This would help us avoid the problem of orphan Arbitrary instances. For instance:or something. Then, we are free to put
Genvalues for any type anywhere, without all thenewtypeshenanigans. We can also freely parameterizeGenvalues based on other values that are only available at runtime, etc etc. I'm sure I've complained about these aspects of type classes before. ;)