Skip to content

Fix issue #18262

xldenis requested to merge xldenis/ghc:fix-18262 into master

This MR fixes the issue raised in #18262 (closed), notably that when an instance mentioned a TypeError, the result was reported incorrectly, showing the constraint as a random type variable.

instance [safe] s0 => Err 'A -- Defined at ../Bug2.hs:8:10

The solution was to zonk the wanted constraints after solving and to relax the test to allow residual constraints which mention a TypeError. After this change the same result would be reported as:

instance [safe] (TypeError ...) => Err 'A
  -- Defined at ../Bug2.hs:8:10
Edited by xldenis

Merge request reports