Template Haskell changes to support overlapping type family instances
The current form of a type family instance in Template Haskell is this constructor of the
TySynInstD Name [Type] Type
Here is the implemented new constructor:
TySynInstD Name TySynEqn
data TySynEqn = TySynEqn [Type] Type
represents one equation with a list of left-hand side patterns and a single right-hand side result.
We also add a new declaration form to the
ClosedTypeFamilyD Name [TyVarBndr] (Maybe Kind) [TySynEqn]
with a straightforward meaning.