[commit: ghc] master: tcCheckSatisfiability: less aggressive superclass expansion (ff752a1)

git at git.haskell.org git at git.haskell.org
Fri Dec 18 15:38:59 UTC 2015


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

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

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

commit ff752a1a5eb69955c0e4fda8647f495409a2c384
Author: Simon Peyton Jones <simonpj at microsoft.com>
Date:   Fri Dec 18 15:34:17 2015 +0000

    tcCheckSatisfiability: less aggressive superclass expansion
    
    In the pattern-match check we are looking for a proof of
    *unsatisfiablity* among a bunch of givens.  The unsat-ness might be
    hidden in the superclasses, so we must expand them.  But in the common
    case where the constraints are satisfiable, we don't want to expand
    a recursive superclass forever.
    
    This is all a bit arbitrary, but then the whole question is
    undecidable anyway.
    
    The bug in Trac #10592 comment:12 was that I expanded superclasses
    forever.  This patch fixes it.


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

ff752a1a5eb69955c0e4fda8647f495409a2c384
 compiler/typecheck/TcSimplify.hs                   |  54 +++++++---
 testsuite/tests/pmcheck/should_compile/T3927b.hs   |   3 +
 testsuite/tests/typecheck/should_compile/T10592.hs | 119 +++++++++++++++++++++
 testsuite/tests/typecheck/should_compile/all.T     |   1 +
 4 files changed, 161 insertions(+), 16 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 ff752a1a5eb69955c0e4fda8647f495409a2c384


More information about the ghc-commits mailing list