[commit: ghc] master: Another major improvement of "improvement" (ddbb97d)

git at git.haskell.org git at git.haskell.org
Thu Jun 11 12:32:26 UTC 2015


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

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

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

commit ddbb97d00fdbc5870a4076ed15af8e607b161cb2
Author: Simon Peyton Jones <simonpj at microsoft.com>
Date:   Thu May 7 09:07:51 2015 +0100

    Another major improvement of "improvement"
    
    I wasn't very happy with my fix to Trac #10009. This is much better.
    
    The main idea is that the inert set now contains a "model", which
    embodies *all* the (nominal) equalities that we know about, with
    a view to exposing unifications.  This requires a lot fewer iterations
    of the solver than before.
    
    There are extensive comments in
     TcSMonad:  Note [inert_model: the inert model]
                Note [Adding an inert canonical constraint the InertCans]
    
    The big changes are
    
      * New inert_model field in InertCans
    
      * Functions addInertEq, addInertCan deal with adding a
        constraint, maintaining the model
    
      * A nice improvement is that unification variables can
        unify with fmvs, so that from, say   alpha ~ fmv
        we get              alpha := fmv
        See Note [Orientation of equalities with fmvs] in TcFlatten
        It's still not perfect, as the Note explains
    
    New flag -fconstraint-solver-iterations=n, allows us to control
    the number of constraint solver iterations, and in particular
    will flag up when it's more than a small number.
    
    Performance is generally slightly better:
    T5837 is a lot better for some reason.


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

ddbb97d00fdbc5870a4076ed15af8e607b161cb2
 compiler/basicTypes/BasicTypes.hs                  |    6 +-
 compiler/main/Constants.hs                         |    5 +
 compiler/main/DynFlags.hs                          |    5 +
 compiler/typecheck/TcCanonical.hs                  |   65 +-
 compiler/typecheck/TcFlatten.hs                    |  447 ++----
 compiler/typecheck/TcInteract.hs                   |  641 ++-------
 compiler/typecheck/TcRnTypes.hs                    |  118 +-
 compiler/typecheck/TcSMonad.hs                     | 1443 ++++++++++++++++----
 compiler/typecheck/TcSimplify.hs                   |   74 +-
 compiler/typecheck/TcType.hs                       |    9 +-
 docs/users_guide/flags.xml                         |   12 +-
 .../tests/indexed-types/should_fail/T2544.stderr   |   21 +-
 .../tests/indexed-types/should_fail/T2627b.stderr  |    6 +-
 .../tests/indexed-types/should_fail/T3330c.stderr  |    6 +-
 .../tests/indexed-types/should_fail/T4254.stderr   |    4 -
 .../tests/indexed-types/should_fail/T6123.stderr   |    8 +-
 .../tests/indexed-types/should_fail/T9662.stderr   |   72 +-
 testsuite/tests/perf/compiler/all.T                |    3 +-
 .../tests/typecheck/should_compile/Improvement.hs  |    1 +
 testsuite/tests/typecheck/should_compile/T10009.hs |   90 +-
 testsuite/tests/typecheck/should_compile/tc237.hs  |    3 +
 .../tests/typecheck/should_fail/IPFail.stderr      |    2 +-
 testsuite/tests/typecheck/should_fail/T5236.hs     |   10 +-
 testsuite/tests/typecheck/should_fail/T5853.stderr |   25 +-
 testsuite/tests/typecheck/should_fail/T5978.hs     |    3 +
 testsuite/tests/typecheck/should_fail/T5978.stderr |    6 +-
 .../typecheck/should_fail/TcCoercibleFail.stderr   |   19 +-
 testsuite/tests/typecheck/should_fail/tcfail138.hs |    2 +-
 .../tests/typecheck/should_fail/tcfail143.stderr   |    4 +-
 .../tests/typecheck/should_fail/tcfail201.stderr   |    2 +-
 30 files changed, 1781 insertions(+), 1331 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 ddbb97d00fdbc5870a4076ed15af8e607b161cb2


More information about the ghc-commits mailing list