[commit: ghc] ghc-8.0: Allow eager unification with type families. (d3991f3)

git at git.haskell.org git at git.haskell.org
Wed Mar 16 08:41:19 UTC 2016


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

On branch  : ghc-8.0
Link       : http://ghc.haskell.org/trac/ghc/changeset/d3991f33738eec7154ced87bd36f32f35b76bd1f/ghc

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

commit d3991f33738eec7154ced87bd36f32f35b76bd1f
Author: Richard Eisenberg <eir at cis.upenn.edu>
Date:   Mon Mar 14 22:09:36 2016 -0400

    Allow eager unification with type families.
    
    Previously, checkTauTvUpdate, used in the eager unifier (TcUnify)
    right before writing to a metavar, refused to write a metavar to
    a type involving type functions. The reason for this was given
    in a Note, but the Note didn't make all that much sense and even
    admitted that it was a bit confused. The Note, in turn, referred
    to another Note, which it was quite sceptical of, as well.
    
    The type-family check was slowing down performance, so I tried
    removing it, running the tests referred to in the Note. The tests
    all passed without the check. Looking at more test results, I
    saw several error messages improve without the check, and some cases
    where GHC looped (T7788, in particular) it now doesn't.
    
    So, all in all, quite a win: Two hairy Notes removed, several lines
    of code removed, better performance, and improved output.
    
    [skip ci]
    
    (cherry picked from commit 3f5d1a13f112f34d992f6b74656d64d95a3f506d)


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

d3991f33738eec7154ced87bd36f32f35b76bd1f
 compiler/typecheck/TcUnify.hs                      | 72 +---------------------
 .../{should_fail => should_compile}/T7788.hs       |  0
 testsuite/tests/indexed-types/should_compile/all.T |  1 +
 .../tests/indexed-types/should_fail/T2693.stderr   | 17 +++--
 .../tests/indexed-types/should_fail/T4179.stderr   |  6 +-
 .../tests/indexed-types/should_fail/T5439.stderr   | 13 ++--
 .../tests/indexed-types/should_fail/T7354.stderr   |  9 ++-
 .../tests/indexed-types/should_fail/T7729.stderr   |  8 +--
 .../tests/indexed-types/should_fail/T7786.stderr   | 12 ++--
 .../tests/indexed-types/should_fail/T7788.stderr   | 10 ---
 .../tests/indexed-types/should_fail/T9554.stderr   | 13 ----
 .../tests/indexed-types/should_fail/T9662.stderr   | 16 ++---
 testsuite/tests/indexed-types/should_fail/all.T    |  1 -
 13 files changed, 40 insertions(+), 138 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 d3991f33738eec7154ced87bd36f32f35b76bd1f


More information about the ghc-commits mailing list