summaryrefslogtreecommitdiff
path: root/testsuite/tests/polykinds
diff options
context:
space:
mode:
authorSimon Peyton Jones <simonpj@microsoft.com>2018-10-26 11:54:20 +0100
committerSimon Peyton Jones <simonpj@microsoft.com>2018-10-26 12:05:43 +0100
commit503514b94f8dc7bd9eab5392206649aee45f140b (patch)
tree8c05957605cfc827381029b48b9bdd2aa85049ae /testsuite/tests/polykinds
parent4de4b2253caa685a39cc654d553cdf63b8babbee (diff)
downloadhaskell-503514b94f8dc7bd9eab5392206649aee45f140b.tar.gz
Fix nasty bug in the type free-var finder, at last
Consider the type forall k. b -> k where b :: k -> Type Here the 'k' in b's kind must be a different 'k' to the forall k, because 'b' is free in the expression. So we must return 'k' among the free vars returned from tyCoVarsOfType applied that type. But we weren't. This is an outright bug, although we don't have a program that fails because of it. It's easy to fix, too: see TyCoRep Note [Closing over free variable kinds] This fix has been in the pipeline for ages because it fell into the Trac #14880 swamp. But this patch nails it.
Diffstat (limited to 'testsuite/tests/polykinds')
-rw-r--r--testsuite/tests/polykinds/T14265.stderr2
1 files changed, 1 insertions, 1 deletions
diff --git a/testsuite/tests/polykinds/T14265.stderr b/testsuite/tests/polykinds/T14265.stderr
index be6868fdc4..43366fccb7 100644
--- a/testsuite/tests/polykinds/T14265.stderr
+++ b/testsuite/tests/polykinds/T14265.stderr
@@ -1,7 +1,7 @@
T14265.hs:7:12: error:
• Found type wildcard ‘_’ standing for ‘w :: k’
- Where: ‘w’, ‘k’ are rigid type variables bound by
+ Where: ‘k’, ‘w’ are rigid type variables bound by
the inferred type of f :: proxy w -> ()
at T14265.hs:8:1-8
To use the inferred type, enable PartialTypeSignatures