[commit: ghc] master: Fix #12442. (9766b0c)

git at git.haskell.org git at git.haskell.org
Fri Sep 23 14:34:23 UTC 2016


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

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

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

commit 9766b0c81476c208b2b29ff66d97251209a79707
Author: Richard Eisenberg <rae at cs.brynmawr.edu>
Date:   Wed Jul 27 16:41:50 2016 -0400

    Fix #12442.
    
    The problem is described in the ticket.
    
    This patch adds new variants of the access points to the pure
    unifier that allow unification of types only when the caller
    wants this behavior. (The unifier used to also unify kinds.)
    This behavior is appropriate when the kinds are either already
    known to be the same, or the list of types provided are a
    list of well-typed arguments to some type constructor. In the
    latter case, unifying earlier types in the list will unify the
    kinds of any later (dependent) types.
    
    At use sites, I went through and chose the unification function
    according to the criteria above.
    
    This patch includes some modest performance improvements as we
    are now doing less work.


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

9766b0c81476c208b2b29ff66d97251209a79707
 compiler/ghci/RtClosureInspect.hs                  |   2 +-
 compiler/specialise/Rules.hs                       |   4 +-
 compiler/typecheck/FunDeps.hs                      |   8 +-
 compiler/typecheck/TcSimplify.hs                   |   6 +-
 compiler/types/Unify.hs                            | 109 +++++++++++++++++----
 testsuite/tests/dependent/should_compile/T12442.hs |  57 +++++++++++
 testsuite/tests/dependent/should_compile/all.T     |   1 +
 testsuite/tests/perf/compiler/all.T                |   9 +-
 8 files changed, 166 insertions(+), 30 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 9766b0c81476c208b2b29ff66d97251209a79707


More information about the ghc-commits mailing list