Introduce a warning for possibly loopy superclass solve
In #20666 (comment 479125), @simonpj suggests a mechanism which would allow us to provide a deprecation period for the changes introduced by MR !7050 (merged). These changes are necessary to avoid constructing non-terminating class dictionaries, as explained in Note [Recursive superclasses]
in GHC.Tc.TyCl.Instance
, but can be counter-intuitive to users and cause breakage to their libraries. So it seems more prudent to introduce a flag, on by default, which temporarily allows this prohibited superclass solving mechanism but emits a loud warning whenever this happens, suggesting that the user fix the code and turn off the flag.
These tickets are examples of the breakage that immediate adoption caused: