Writing the wrong constraint on a polymorphic function (e.g., imposing A_Setter when you really need A_Traversal) tends to give confusing overlapping instance errors. I believe this is because of the way GHC handles functional dependencies. Can those errors be improved by using type family-based constraints instead of fundeps?
Writing the wrong constraint on a polymorphic function (e.g., imposing
A_Setter
when you really needA_Traversal
) tends to give confusing overlapping instance errors. I believe this is because of the way GHC handles functional dependencies. Can those errors be improved by using type family-based constraints instead of fundeps?