Closed bergmark closed 8 years ago
Hmm, I don't know much about the OVERLAPS pragmas. Maybe we should go for the conditional?
It's pretty simple (but perhaps my explanation makes it sound hard 😞 ); Marking an instance as OVERLAPPING
allows it to overlap other instances, marking it as OVERLAPPABLE
allows for other instances to overlap it. If A should overlap B only one of these are needed, but having both doesn't hurt. Finally OVERLAPS
is OVERLAPPING
+OVERLAPPABLE
which is the same as having the instance in a module with -XOverlappingInstances
enabled.
But I agree that the conditional is better, overlapping instances should be avoided when possible IMO.
I'll send a PR.
There are two compilation error against the newest aeson, they can be fixed in different ways.
{-# OVERLAPS #-}
pragmas for newer GHCs and enableOverlappingInstances
for older ones.Which one should we go for?