[commit: ghc] master: Fix another dark corner in the shortcut solver (30058b0)

git at git.haskell.org git at git.haskell.org
Wed Nov 8 11:18:26 UTC 2017


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

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

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

commit 30058b0e45e920319916be999de9c4d77da136e7
Author: Simon Peyton Jones <simonpj at microsoft.com>
Date:   Wed Nov 8 08:45:53 2017 +0000

    Fix another dark corner in the shortcut solver
    
    The shortcut solver for type classes (Trac #12791) was eagerly
    solving a constaint from an OVERLAPPABLE instance. It happened
    to be the only one in scope, so it was unique, but since it's
    specfically flagged as overlappable it's really a bad idea to
    solve using it, rather than using the Given dictionary.
    
    This led to Trac #14434, a nasty and hard to identify bug.


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

30058b0e45e920319916be999de9c4d77da136e7
 compiler/typecheck/TcInteract.hs                   | 85 +++++++++++++---------
 testsuite/tests/typecheck/should_compile/T14434.hs | 17 +++++
 .../tests/typecheck/should_compile/T14434.stdout   |  2 +
 testsuite/tests/typecheck/should_compile/all.T     |  1 +
 4 files changed, 71 insertions(+), 34 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 30058b0e45e920319916be999de9c4d77da136e7


More information about the ghc-commits mailing list