inconsistent naming/typing in exists/forall
jwaldmann opened this issue · 2 comments
"exists" and "forall" should have idential types?
exists :: (Show a, Serial a, Testable b) => (a -> b) -> Property
forAll :: (Show a, Testable b) => Series a -> (a -> b) -> Property
(I'd prefer to have a version of "forall" without the Series a argument.
Yes, I know I can just test the function, but writing explicit "forall" looks
much better.)
The reason there's no such forAll is exactly that, as you say, it's redundant.
And so this name got reused for something different.
While I agree that this is inconsistent, I don't see any obvious fix (i.e. how
should the current forAll be called). It would be nice to come up with some
consistent naming scheme one day. If you have any suggestions, let's
consider them.
Otherwise, I can suggest defining
forAll = id
or
forAll = property
locally (and hide the existing forAll
if you need to import
Test.SmallCheck.Series
).
OK.