Skip to content
  • Simon Peyton Jones's avatar
    Do not discard insoluble Derived constraints · 20632d37
    Simon Peyton Jones authored
    This is preparing for a fix to Trac #9612. The idea is that insoluble
    constraints are nice solid errors that we should not discard before
    we have a chance to report them.  So TcRnTypes.dropDerivedWC now
    keeps insoluble Derived constrains, and instead TcSimplify.solve_wanteds
    filters them out
    
    We get somewhat better error message for kind-equality failures too.
    
    A slight downside is that to avoid *duplicate* kind-equality failures
    when we float a kind-incompatible equality (e.g.  alpha:* ~ Int#),
    I've disabled constraint-floating when there are insolubles.  But that
    in turn makes a handful of error messages a little less informative;
    good examples are mc21, mc22, mc25.  But I am re-jigging the
    constraint floating machinery in another branch, which will make this
    go back to the way it was before.
    20632d37