diff options
author | Simon Peyton Jones <simonpj@microsoft.com> | 2017-12-11 11:52:44 +0000 |
---|---|---|
committer | Simon Peyton Jones <simonpj@microsoft.com> | 2017-12-11 15:30:10 +0000 |
commit | 8b36ed129652df07af22b5e2a2e57b1df8cfbbc9 (patch) | |
tree | 8f71c2ae80018db54fc34768b911c70503980ed8 /testsuite/tests/polykinds/T14520.stderr | |
parent | 716acbb5084db6ace5f06bd6112aa1e24b46423a (diff) | |
download | haskell-8b36ed129652df07af22b5e2a2e57b1df8cfbbc9.tar.gz |
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
Diffstat (limited to 'testsuite/tests/polykinds/T14520.stderr')
-rw-r--r-- | testsuite/tests/polykinds/T14520.stderr | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/testsuite/tests/polykinds/T14520.stderr b/testsuite/tests/polykinds/T14520.stderr new file mode 100644 index 0000000000..e19d834b95 --- /dev/null +++ b/testsuite/tests/polykinds/T14520.stderr @@ -0,0 +1,5 @@ + +T14520.hs:15:24: error: + • Expected kind ‘bat w w’, but ‘Id’ has kind ‘XXX (XXX kat0 b0) b0’ + • In the first argument of ‘Sing’, namely ‘(Id :: bat w w)’ + In the type signature: sId :: Sing w -> Sing (Id :: bat w w) |