[commit: ghc] master: Implement a fast path for new constraints looking like (a~b), namely unifyWanted (832f8db)

git at git.haskell.org git at git.haskell.org
Wed Dec 10 16:00:36 UTC 2014


Repository : ssh://git@git.haskell.org/ghc

On branch  : master
Link       : http://ghc.haskell.org/trac/ghc/changeset/832f8db2ee13120d5914149bd86f81df7e377b75/ghc

>---------------------------------------------------------------

commit 832f8db2ee13120d5914149bd86f81df7e377b75
Author: Simon Peyton Jones <simonpj at microsoft.com>
Date:   Wed Dec 10 14:11:51 2014 +0000

    Implement a fast path for new constraints looking like (a~b), namely unifyWanted
    
    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.


>---------------------------------------------------------------

832f8db2ee13120d5914149bd86f81df7e377b75
 compiler/typecheck/TcCanonical.hs | 387 ++++++++++++++++++++++++++++++++++++--
 compiler/typecheck/TcInteract.hs  |  17 +-
 compiler/typecheck/TcSMonad.hs    | 353 ++++++----------------------------
 3 files changed, 436 insertions(+), 321 deletions(-)

Diff suppressed because of size. To see it, use:

    git diff-tree --root --patch-with-stat --no-color --find-copies-harder --ignore-space-at-eol --cc 832f8db2ee13120d5914149bd86f81df7e377b75


More information about the ghc-commits mailing list