Skip to content

Fix bad interaction between withDict and the Specialiser

Simon Peyton Jones requested to merge wip/T21575 into master

This MR fixes a bad bug, where the withDict was inlined too vigorously, which in turn made the type-class Specialiser generate a bogus specialisation, because it saw the same overloaded function applied to two /different/ dictionaries.

Solution: inline withDict later. See (WD8) of Note [withDict] in GHC.HsToCore.Expr

See #21575, which is fixed by this change.

Merge request reports