You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
For the most part, this [PR] looks good. Currently, generic1Laws will be exceeding unpleasant to use since it requires (Eq1 (Rep1 f), Show1 (Rep1 f), Arbitrary1 (Rep1 f)). I think that in this case, for the sake of usability, it is probably better to just nail down the type to something like Bool or Integer:
generic1Laws:: (Generic1f, Eq (fBool), Arbitrary (fBool), Show (fBool), Eq (Rep1fBool), Show (Rep1fBool), Arbitrary (Rep1fBool)) =>proxyf->Laws
As much as I hate FlexibleContexts, the only other option here would be to add Eq1 and Show1 instances to all the generics machinery in base and then to get Arbitrary1 instances for all the same types added to QuickCheck. This would take a while.
Actually, there's another way that involves replicating all the generics machinery and then writing a type family to marshal from the types in GHC.Generics to the copies of the types in this library. Then, we could have our instances. But this would be miserable.
If this [PR] builds, I think I may go ahead and merge this, and then Generic1's laws function could be worked out on a separate PR.
The text was updated successfully, but these errors were encountered:
@andrewthad from PR #58:
The text was updated successfully, but these errors were encountered: