Use the correct in-scope set in coercionKind
authorBartosz Nitka <niteria@gmail.com>
Mon, 21 Mar 2016 18:11:26 +0000 (11:11 -0700)
committerBartosz Nitka <niteria@gmail.com>
Mon, 21 Mar 2016 22:17:06 +0000 (15:17 -0700)
commit685398ebc5c8377597714cd8c3e97439d32e3a02
tree2e5266ce1e920a426e86c9489be6e4b9322eb14e
parent6f0e41da96b79cde49ad8761738c281cd190ac65
Use the correct in-scope set in coercionKind

The free vars of `ty2` need to be in scope to satisfy the substitution
invariant.
As far as I can tell we don't have the free vars of `ty2` when
substituting, so unfortunately we have to compute them.

Test Plan: ./validate

Reviewers: austin, bgamari, simonpj, goldfire

Subscribers: thomie, simonmar

Differential Revision: https://phabricator.haskell.org/D2024

GHC Trac Issues: #11371
compiler/types/Coercion.hs