Skip to content
  • Simon Peyton Jones's avatar
    Implement a fast path for new constraints looking like (a~b), namely unifyWanted · 832f8db2
    Simon Peyton Jones authored
    Looking at some typechecker traces I could see places where we were laboriously
    creating a Refl coercion.  This patch short-circuits the process.
    
    See TcCanonical:
      Note [unifyWanted and unifyDerived]
      Note [Decomposing TyConApps]
    
    I ended up with some refactoring, notably
    
      * I moved xCtEvidence, rewriteEvidence, rewriteEqEvidence
        from TcSMonad to TcCanonical
    
    There are some knock-on effects, but only minor ones.
    832f8db2