Use the correct substitution in lintCoercion
authorBartosz Nitka <niteria@gmail.com>
Tue, 29 Mar 2016 10:42:32 +0000 (12:42 +0200)
committerBen Gamari <ben@smart-cactus.org>
Tue, 29 Mar 2016 10:42:33 +0000 (12:42 +0200)
commit4a93e4f9a86a62d1cdf2e666f977b8b58e61eaaf
tree196d0854b6f6feb0eeba73ca5ca56a461ac55b4a
parenta49228e3b6e3737da750bce59ec721b3b2f18eed
Use the correct substitution in lintCoercion

We need the free vars of `t2` to satisfy the substitution
invariant. Luckily they are in the in-scope carried around.

Test Plan: ./validate

Reviewers: bgamari, austin, goldfire, simonpj

Reviewed By: simonpj

Subscribers: thomie, simonmar

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

GHC Trac Issues: #11371
compiler/coreSyn/CoreLint.hs
compiler/types/TyCoRep.hs
compiler/types/Type.hs