diff options
author | Simon Peyton Jones <simonpj@microsoft.com> | 2018-10-26 11:54:20 +0100 |
---|---|---|
committer | Simon Peyton Jones <simonpj@microsoft.com> | 2018-10-26 12:05:43 +0100 |
commit | 503514b94f8dc7bd9eab5392206649aee45f140b (patch) | |
tree | 8c05957605cfc827381029b48b9bdd2aa85049ae /compiler/prelude | |
parent | 4de4b2253caa685a39cc654d553cdf63b8babbee (diff) | |
download | haskell-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 'compiler/prelude')
0 files changed, 0 insertions, 0 deletions