Skip to content

Introduce warning for loopy superclass solve

sheaf requested to merge sheaf/ghc:T22912 into master

Commit aed1974e completely re-engineered the treatment of loopy superclass dictionaries in instance declarations. Unfortunately, it has the potential to break (albeit in a rather minor way) user code.

To alleviate migration concerns, this commit re-introduces the old behaviour. Any reliance on this old behaviour triggers a warning, controlled by -Wloopy-superclass-solve. The warning text explains that GHC might produce bottoming evidence, and provides a migration strategy.

This allows us to provide a graceful migration period, alerting users when they are relying on this unsound behaviour.

Edited by sheaf

Merge request reports