Idea from https://gist.github.com/Icelandjack/e1ddefb0d5a79617a81ee98c49fbbdc4
Works great for concrete types
data A = MkA
instance (Eq & Ord & Show & Arbitrary) A where
(==) :: A -> A -> Bool
MkA == MkA = True
compare :: A -> A -> Ordering
MkA `compare` MkA = EQ
show :: A -> String
show MkA = "MkA"
arbitrary :: Gen A
arbitrary = pure MkA
Not so nice for type constructors
Now all of a sudden
(==) @(B _) :: EOSA b => B b -> B b -> Bool
which is ridiculous. We should be able to tailor the context to each method or group of methods.