summaryrefslogtreecommitdiff
path: root/testsuite/tests/dependent/should_fail/all.T
diff options
context:
space:
mode:
authorSimon Peyton Jones <simonpj@microsoft.com>2018-07-09 17:20:06 +0100
committerSimon Peyton Jones <simonpj@microsoft.com>2018-07-10 09:28:43 +0100
commitaedbf7f1c402ecbcb5ff192d5fb4dd6dd4771bf8 (patch)
tree0e782ee467b45f4914215863a38833849a2b26d8 /testsuite/tests/dependent/should_fail/all.T
parentfd0f0334189c0c5c9b186bd1b009f706d3d86086 (diff)
downloadhaskell-aedbf7f1c402ecbcb5ff192d5fb4dd6dd4771bf8.tar.gz
Fix decompsePiCos and visible type application
Trac #15343 was caused by two things First, in TcHsType.tcHsTypeApp, which deals with the type argment in visible type application, we were failing to call solveLocalEqualities. But the type argument is like a user type signature so it's at least inconsitent not to do so. I thought that would nail it. But it didn't. It turned out that we were ended up calling decomposePiCos on a type looking like this (f |> co) Int where co :: (forall a. ty) ~ (t1 -> t2) Now, 'co' is insoluble, and we'll report that later. But meanwhile we don't want to crash in decomposePiCos. My fix involves keeping track of the type on both sides of the coercion, and ensuring that the outer shape matches before decomposing. I wish there was a simpler way to do this. But I think this one is at least robust. I suppose it is possible that the decomposePiCos fix would have cured the original report, but I'm leaving the one-line tcHsTypeApp fix in too because it just seems more consistent.
Diffstat (limited to 'testsuite/tests/dependent/should_fail/all.T')
-rw-r--r--testsuite/tests/dependent/should_fail/all.T2
1 files changed, 2 insertions, 0 deletions
diff --git a/testsuite/tests/dependent/should_fail/all.T b/testsuite/tests/dependent/should_fail/all.T
index 1bc3f42a92..59d80375ff 100644
--- a/testsuite/tests/dependent/should_fail/all.T
+++ b/testsuite/tests/dependent/should_fail/all.T
@@ -33,3 +33,5 @@ test('InferDependency', normal, compile_fail, [''])
test('T15245', normal, compile_fail, [''])
test('T15215', normal, compile_fail, [''])
test('T15308', normal, compile_fail, ['-fno-print-explicit-kinds'])
+test('T15343', normal, compile_fail, [''])
+