Skip to content
  • Simon Peyton Jones's avatar
    Major patch to add -fwarn-redundant-constraints · 32973bf3
    Simon Peyton Jones authored
    The idea was promted by Trac #9939, but it was Christmas, so I did
    some recreational programming that went much further.
    
    The idea is to warn when a constraint in a user-supplied context is
    redundant.  Everything is described in detail in
      Note [Tracking redundant constraints]
    in TcSimplify.
    
    Main changes:
    
     * The new ic_status field in an implication, of type ImplicStatus.
       It replaces ic_insol, and includes information about redundant
       constraints.
    
     * New function TcSimplify.setImplicationStatus sets the ic_status.
    
     * TcSigInfo has sig_report_redundant field to say whenther a
       redundant constraint should be reported; and similarly
       the FunSigCtxt constructor of UserTypeCtxt
    
     * EvBinds has a field eb_is_given, to record whether it is a given
       or wanted binding. Some consequential chagnes to creating an evidence
       binding (so that we record whether it is given or wanted).
    
     * AbsBinds field abs_ev_binds is now a *list* of TcEvBiinds;
       see No...
    32973bf3