[commit: ghc] master: Improve TcFlatten.flattenTyVar (a7ee2d4)

git at git.haskell.org git at git.haskell.org
Fri Apr 15 15:31:09 UTC 2016


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

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

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

commit a7ee2d4c4229b27af324ebac93081f692835365d
Author: Simon Peyton Jones <simonpj at microsoft.com>
Date:   Fri Apr 15 16:17:54 2016 +0100

    Improve TcFlatten.flattenTyVar
    
    This patch tides up the structure, simplifying FlattenTvResult.
    
    It also replaces a use of zonkTcType (which I hated) with
    coercionKind, in that same function.  Happily, the result is
    little faster, maybe even a percentage point or two, which is
    a lot for a compiler.
    
    This also removes the line
       || not (map binderVisibility bndrs1 == map binderVisibility bndrs2)
    from TcCanonical.can_eq_nc', in the ForAllTy/ForAllTy case.
    
    Why? Becuase I can't see why binder-visiblity should matter, and
    when we use coercionKind instead of zonkTcType in flattenTyVar,
    this case pops up and rejects a program that should pass.  I did
    discuss this with Richard.


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

a7ee2d4c4229b27af324ebac93081f692835365d
 compiler/typecheck/TcCanonical.hs   |  7 ++-
 compiler/typecheck/TcFlatten.hs     | 90 +++++++++++++++++--------------------
 testsuite/tests/perf/compiler/all.T |  4 +-
 3 files changed, 50 insertions(+), 51 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 a7ee2d4c4229b27af324ebac93081f692835365d


More information about the ghc-commits mailing list