[commit: ghc] master: Fix #14369 by making injectivity warnings finer-grained (8846a7f)
git at git.haskell.org
git at git.haskell.org
Thu Oct 19 14:26:28 UTC 2017
Repository : ssh://git@git.haskell.org/ghc
On branch : master
Link : http://ghc.haskell.org/trac/ghc/changeset/8846a7fdcf2060dd37e66b4d1f89bd8fdfad4620/ghc
>---------------------------------------------------------------
commit 8846a7fdcf2060dd37e66b4d1f89bd8fdfad4620
Author: Ryan Scott <ryan.gl.scott at gmail.com>
Date: Thu Oct 19 10:21:28 2017 -0400
Fix #14369 by making injectivity warnings finer-grained
Summary:
Previously, GHC would always raise the possibility that a
type family might not be injective in certain error messages, even if
that type family actually //was// injective. Fix this by actually
checking for a type family's lack of injectivity before emitting
such an error message.
Test Plan: ./validate
Reviewers: goldfire, austin, bgamari, simonpj
Reviewed By: simonpj
Subscribers: simonpj, rwbarton, thomie
GHC Trac Issues: #14369
Differential Revision: https://phabricator.haskell.org/D4106
>---------------------------------------------------------------
8846a7fdcf2060dd37e66b4d1f89bd8fdfad4620
compiler/typecheck/TcErrors.hs | 3 ++-
.../indexed-types/should_fail/NoMatchErr.stderr | 5 ++--
.../tests/indexed-types/should_fail/T14369.hs | 27 ++++++++++++++++++++++
.../tests/indexed-types/should_fail/T14369.stderr | 9 ++++++++
.../tests/indexed-types/should_fail/T1897b.stderr | 2 +-
.../tests/indexed-types/should_fail/T1900.stderr | 2 +-
.../tests/indexed-types/should_fail/T2544.stderr | 4 ++--
.../tests/indexed-types/should_fail/T2664.stderr | 2 +-
.../tests/indexed-types/should_fail/T4099.stderr | 2 +-
.../tests/indexed-types/should_fail/T4179.stderr | 2 +-
.../tests/indexed-types/should_fail/T9036.stderr | 2 +-
.../tests/indexed-types/should_fail/T9171.stderr | 2 +-
testsuite/tests/indexed-types/should_fail/all.T | 1 +
testsuite/tests/typecheck/should_fail/T5853.stderr | 16 ++++---------
testsuite/tests/typecheck/should_fail/T8030.stderr | 4 ++--
testsuite/tests/typecheck/should_fail/T8034.stderr | 2 +-
16 files changed, 58 insertions(+), 27 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 8846a7fdcf2060dd37e66b4d1f89bd8fdfad4620
More information about the ghc-commits
mailing list