Skip to content

Fix a long standing bug in constraint solving

Simon Peyton Jones requested to merge ghc-9.0 into master

When combining

 Inert:     [W] C ty1 ty2
 Work item: [D] C ty1 ty2

we were simply discarding the Derived one. Not good! We should turn the inert back into [WD] or keep both. E.g. fundeps work only on Derived (see isImprovable).

This little patch fixes it. The bug is hard to tickle, but #19315 (closed) did so.

Merge request reports