[commit: ghc] master: Special-case implicit params in superclass expansion (ff21795)

git at git.haskell.org git at git.haskell.org
Mon Jan 25 11:31:18 UTC 2016


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

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

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

commit ff21795a0b9253e811a45626d5686e981ed07f82
Author: Simon Peyton Jones <simonpj at microsoft.com>
Date:   Fri Jan 22 16:34:18 2016 +0000

    Special-case implicit params in superclass expansion
    
    This issue came up in Trac #11480, and is documented in
    Note [When superclasses help] in TcRnTypes.
    
    We were getting a spurious warning
      T11480.hs:1:1: warning:
         solveWanteds: too many iterations (limit = 4)
    
    The fix is easy.  A bit of refactoring along the way.
    
    The original bug report in Trac #11480 appears to work
    fine in HEAD and the 8.0 branch but I added a regression
    test in this commit as well.


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

ff21795a0b9253e811a45626d5686e981ed07f82
 compiler/typecheck/TcCanonical.hs                  | 11 +--
 compiler/typecheck/TcRnTypes.hs                    | 81 +++++++++++++++++-----
 compiler/typecheck/TcSMonad.hs                     |  9 +--
 compiler/typecheck/TcSimplify.hs                   | 12 +++-
 testsuite/tests/polykinds/T11480a.hs               | 26 +++++++
 testsuite/tests/polykinds/all.T                    |  1 +
 testsuite/tests/typecheck/should_compile/T11480.hs |  9 +++
 testsuite/tests/typecheck/should_compile/all.T     |  1 +
 8 files changed, 118 insertions(+), 32 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 ff21795a0b9253e811a45626d5686e981ed07f82


More information about the ghc-commits mailing list