[commit: ghc] master: Build only well-kinded types in type checker (8b36ed1)
git at git.haskell.org
git at git.haskell.org
Mon Dec 11 15:30:49 UTC 2017
Repository : ssh://git@git.haskell.org/ghc
On branch : master
Link : http://ghc.haskell.org/trac/ghc/changeset/8b36ed129652df07af22b5e2a2e57b1df8cfbbc9/ghc
>---------------------------------------------------------------
commit 8b36ed129652df07af22b5e2a2e57b1df8cfbbc9
Author: Simon Peyton Jones <simonpj at microsoft.com>
Date: Mon Dec 11 11:52:44 2017 +0000
Build only well-kinded types in type checker
During type inference, we maintain the invariant that every type is
well-kinded /without/ zonking; and in particular that typeKind does
not fail (as it can for ill-kinded types).
But TcHsType.tcInferApps was not guaranteeing this invariant,
resulting in Trac #14174 and #14520.
This patch fixes it, making things better -- but it does /not/
fix the program in Trac #14174 comment:5, which still crashes.
So more work to be done.
See Note [Ensure well-kinded types] in TcHsType
>---------------------------------------------------------------
8b36ed129652df07af22b5e2a2e57b1df8cfbbc9
compiler/typecheck/TcHsType.hs | 40 +++++++++++++---
testsuite/tests/polykinds/T14174.hs | 6 +++
testsuite/tests/polykinds/T14174.stderr | 7 +++
testsuite/tests/polykinds/T14174a.hs | 56 ++++++++++++++++++++++
.../tests/polykinds/T14174a.stderr | 1 +
testsuite/tests/polykinds/T14520.hs | 16 +++++++
testsuite/tests/polykinds/T14520.stderr | 5 ++
testsuite/tests/polykinds/all.T | 3 ++
8 files changed, 128 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 8b36ed129652df07af22b5e2a2e57b1df8cfbbc9
More information about the ghc-commits
mailing list