Improve overlap error for poly-kinded constraints
There were two problems around mkDictErr
:
-
An outdated call to
flattenTys
meant that we missed out on some instances. As we no longer flatten type-family applications, the logic is obsolete and can be removed. -
We reported "out of scope" errors in a poly-kinded situation because
BoxedRep
andLifted
were considered out of scope. We fix this by usingpretendNameIsInScope
.
Edited by sheaf