[commit: ghc] master: Fix the coverage checker's treatment of existential tyvars (a2d03c6)

git at git.haskell.org git at git.haskell.org
Fri Mar 2 21:54:35 UTC 2018


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

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

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

commit a2d03c69b782212e6c476cfc1870bae493a4ac89
Author: Ryan Scott <ryan.gl.scott at gmail.com>
Date:   Fri Mar 2 16:18:04 2018 -0500

    Fix the coverage checker's treatment of existential tyvars
    
    Previously, the pattern-match coverage checker was far too
    eager to freshen the names of existentially quantified type
    variables, which led to incorrect sets of type constraints that
    misled GHC into thinking that certain programs that involve nested
    GADT pattern matches were non-exhaustive (when in fact they were).
    Now, we generate extra equality constraints in the ConCon case of
    the coverage algorithm to ensure that these fresh tyvars align
    with existing existential tyvars. See
    `Note [Coverage checking and existential tyvars]` for the full story.
    
    Test Plan: make test TEST="T11984 T14098"
    
    Reviewers: gkaracha, bgamari, simonpj
    
    Reviewed By: simonpj
    
    Subscribers: simonpj, rwbarton, thomie, carter
    
    GHC Trac Issues: #11984, #14098
    
    Differential Revision: https://phabricator.haskell.org/D4434


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

a2d03c69b782212e6c476cfc1870bae493a4ac89
 compiler/deSugar/Check.hs                        | 143 ++++++++++++++++++++++-
 testsuite/tests/pmcheck/should_compile/T11984.hs |  23 ++++
 testsuite/tests/pmcheck/should_compile/T14098.hs |  24 ++++
 testsuite/tests/pmcheck/should_compile/all.T     |   4 +
 4 files changed, 188 insertions(+), 6 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 a2d03c69b782212e6c476cfc1870bae493a4ac89


More information about the ghc-commits mailing list