Skip to content

Improve overlap error for poly-kinded constraints

sheaf requested to merge sheaf/ghc:T20465 into master

There were two problems around mkDictErr:

  1. 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.

  2. We reported "out of scope" errors in a poly-kinded situation because BoxedRep and Lifted were considered out of scope. We fix this by using pretendNameIsInScope.

See #20465 (comment 380674).

Edited by sheaf

Merge request reports