Skip to content

Fix various skolem scope errors with StandaloneKindSignatures (fixes #18640)

Csongor Kiss requested to merge kcsongor/ghc:T18640 into master

This MR fixes the issues in #18640 (closed). All three of these bugs turned out to be variations of the common theme: a type error under a forall (implication) involving a skolem variable without an implication constraint binding site.

Some background: While these programs are contrived, the issue actually came up quite frequently on my UnsaturatedTypeFamilies branch (kcsongor/ghc#17 (closed)) when quantifying over matchability variables.

The three bugs are each fixed in a separate commit, with accompanying test cases.

Fixing these bugs uncovered other bugs where the skolem info was missing without causing a panic, as the skolem info is only looked up when reporting an insoluble implication constraint, and the existing programs had no such constraints in them. These related bugs are detailed in the commit messages.

Edited by Csongor Kiss

Merge request reports