well-typed / optics

Optics as an abstract interface
374 stars 24 forks source link

Improve type errors #476

Open treeowl opened 1 year ago

treeowl commented 1 year ago

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?