[commit: ghc] ghc-8.4: Inform hole substitutions of typeclass constraints (fixes #14273). (96b52e6)

git at git.haskell.org git at git.haskell.org
Thu Jan 18 19:20:50 UTC 2018


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

On branch  : ghc-8.4
Link       : http://ghc.haskell.org/trac/ghc/changeset/96b52e63b850f8072b905ca232b5644efc011b37/ghc

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

commit 96b52e63b850f8072b905ca232b5644efc011b37
Author: Matthías Páll Gissurarson <mpg at mpg.is>
Date:   Thu Jan 18 00:49:38 2018 -0500

    Inform hole substitutions of typeclass constraints (fixes  #14273).
    
    This implements SPJ's suggestion on the ticket (#14273). We find the
    relevant constraints (ones that whose free unification variables are all
    mentioned in the type of the hole), and then clone the free unification
    variables of the hole and the relevant constraints. We then add a
    subsumption constraints and run the simplifier, and then check whether
    all the constraints were solved.
    
    Reviewers: bgamari
    
    Reviewed By: bgamari
    
    Subscribers: RyanGlScott, rwbarton, thomie, carter
    
    GHC Trac Issues: #14273
    
    Differential Revision: https://phabricator.haskell.org/D4315
    
    (cherry picked from commit 1e14fd3ecfd468c3beddb2e5f992c358e1a798de)


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

96b52e63b850f8072b905ca232b5644efc011b37
 compiler/typecheck/TcErrors.hs                     | 271 ++++++++-----
 compiler/typecheck/TcRnTypes.hs                    |  13 +-
 compiler/typecheck/TcSimplify.hs                   |  16 +-
 compiler/typecheck/TcSimplify.hs-boot              |   6 +-
 testsuite/tests/ghci/scripts/T8353.stderr          |   5 +
 testsuite/tests/th/T10267.stderr                   |   5 +
 testsuite/tests/th/all.T                           |   2 +-
 .../tests/typecheck/should_compile/T13050.stderr   |   6 +
 testsuite/tests/typecheck/should_compile/T14273.hs |  13 +
 .../tests/typecheck/should_compile/T14273.stderr   |  80 ++++
 .../tests/typecheck/should_compile/T14590.stderr   |  10 +
 .../tests/typecheck/should_compile/T9497a.stderr   |   1 +
 testsuite/tests/typecheck/should_compile/all.T     |   1 +
 .../should_compile/hole_constraints.stderr         |   8 +-
 .../tests/typecheck/should_compile/holes.stderr    | 448 ++++++++++++++++++++-
 .../tests/typecheck/should_compile/holes2.stderr   |  24 +-
 .../tests/typecheck/should_compile/holes3.stderr   | 448 ++++++++++++++++++++-
 .../should_compile/valid_substitutions.hs          |  22 +-
 .../should_compile/valid_substitutions.stderr      | 237 ++++++++++-
 .../valid_substitutions_interactions.hs            |  15 +
 .../valid_substitutions_interactions.stderr        |  18 +
 .../tests/typecheck/should_fail/T9497d.stderr      |   1 +
 .../tests/typecheck/should_run/T9497a-run.stderr   |   1 +
 .../tests/typecheck/should_run/T9497b-run.stderr   |   1 +
 .../tests/typecheck/should_run/T9497c-run.stderr   |   1 +
 25 files changed, 1498 insertions(+), 155 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 96b52e63b850f8072b905ca232b5644efc011b37


More information about the ghc-commits mailing list