[commit: ghc] master: Reject class instances with type families in kinds (6dea7c1)
git at git.haskell.org
git at git.haskell.org
Sun Sep 2 21:16:13 UTC 2018
Repository : ssh://git@git.haskell.org/ghc
On branch : master
Link : http://ghc.haskell.org/trac/ghc/changeset/6dea7c161e458ddb3ea4afd366887c8d963c6585/ghc
>---------------------------------------------------------------
commit 6dea7c161e458ddb3ea4afd366887c8d963c6585
Author: Ryan Scott <ryan.gl.scott at gmail.com>
Date: Sun Sep 2 22:03:53 2018 +0200
Reject class instances with type families in kinds
Summary:
GHC doesn't know how to handle type families that appear in
class instances. Unfortunately, GHC didn't reject instances where
type families appear in //kinds//, leading to #15515. This is easily
rectified by calling `checkValidTypePat` on all arguments to a class
in an instance (and not just the type arguments).
Test Plan: make test TEST=T15515
Reviewers: bgamari, goldfire, simonpj
Reviewed By: simonpj
Subscribers: simonpj, rwbarton, carter
GHC Trac Issues: #15515
Differential Revision: https://phabricator.haskell.org/D5068
>---------------------------------------------------------------
6dea7c161e458ddb3ea4afd366887c8d963c6585
compiler/typecheck/TcValidity.hs | 62 ++++++++++++++--------
compiler/types/Type.hs | 9 +++-
.../indexed-types/should_fail/SimpleFail13.stderr | 14 ++---
.../tests/indexed-types/should_fail/T2203a.stderr | 8 +--
.../tests/indexed-types/should_fail/T9097.stderr | 9 ++--
testsuite/tests/polykinds/T11520.stderr | 4 +-
.../tests/typecheck/should_fail/T13909.stderr | 6 +++
testsuite/tests/typecheck/should_fail/T15515.hs | 20 +++++++
.../tests/typecheck/should_fail/T15515.stderr | 6 +++
testsuite/tests/typecheck/should_fail/all.T | 1 +
10 files changed, 101 insertions(+), 38 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 6dea7c161e458ddb3ea4afd366887c8d963c6585
More information about the ghc-commits
mailing list