Open
Description
instead of:
prop1 :: forall proxy f.
#if HAVE_QUANTIFIED_CONSTRAINTS
(blah)
#else
(blah1)
#endif
=> proxy f -> Property
...
prop1 :: forall proxy f.
#if HAVE_QUANTIFIED_CONSTRAINTS
(blah)
#else
(blah1)
#endif
=> proxy f -> Property
we can have, using Bifunctor as an example, the following:
type BifunctorProp f =
( Bifunctor f
#if HAVE_QUANTIFIED_CONSTRAINTS
, forall x y. (Eq x, Eq y) => Eq (f x y)
, forall x y. (Show x, Show y) => Show (f x y)
, forall x y. (Arbitrary x, Arbitrary y) => Arbitrary (f x y)
#else
, Eq2 f
, Show2 f
, Arbitrary2 f
#endif
) => proxy f -> Property
prop1 :: forall f. BifunctorProp f
prop2 :: forall f. BifunctorProp f
...
prop3million :: forall f. BifunctorProp f
this would help reduce at least some of the noise, and wouldn't be visible externally, since it only affects the internal properties (ie not the user-facing functions of type Proxy a -> Laws
)
Activity
chessai commentedon Aug 8, 2019
this requires constraintkinds. do those work in 7.4? a comment from ekmett in the documentation for the
constraints
package seems to indicate that they do not.andrewthad commentedon Aug 8, 2019
I think this is a good idea. Even without
ConstraintKinds
:In the values exposed to the end user, we would still want to make sure that we write out the full signature.
chessai commentedon Aug 8, 2019
seems a waste to introduce a new class. pollution. i would rather just wait until we don't have to support 7.4, since 7.6 is when ConstraintKinds don't crash GHC.
andrewthad commentedon Aug 8, 2019
The class wouldn't be visible to users, but regardless I'm fine with waiting until
primitive
drops support for GHC 7.4.