Skip to content

Update inert_solved_dicts for ImplicitParams

sheaf requested to merge sheaf/ghc:T23761 into master

When adding an implicit parameter dictionary to the inert set, we must make sure that it replaces any previous implicit parameter dictionaries that overlap, in order to get the appropriate shadowing behaviour, as in

let ?x = 1 in let ?x = 2 in ?x

We were already doing this for inert_cans, but we weren't doing the same thing for inert_solved_dicts, which lead to the bug reported in #23761 (closed).

The fix is thus to make sure that, when handling an implicit parameter dictionary in updInertDicts, we update both inert_cans and inert_solved_dicts to ensure a new implicit parameter dictionary correctly shadows old ones.

Merge request reports