Skip to content
  • Simon Peyton Jones's avatar
    Fix a nasty superclass expansion bug · 43e02d12
    Simon Peyton Jones authored
    This patch fixes Trac #11523.
    
    * The basic problem was that TcRnTypes.superClassesMightHelp was
      returning True of a Derived constraint, and that led to us
      expanding Given superclasses, which produced the same Derived
      constraint again, and so on infinitely.  We really want to do
      this only if there are unsolve /Wanted/ contraints!
    
    * On the way I made TcSMonad.getUnsolvedInerts a bit more
      discriminating about which Derived equalities it returns;
      see Note [Unsolved Derived equalities] in TcSMonad
    
    * Lots of new comments in TcSMonad.
    43e02d12