Build the substitution correctly in piResultTy
authorBartosz Nitka <niteria@gmail.com>
Thu, 11 Feb 2016 17:44:53 +0000 (09:44 -0800)
committerBartosz Nitka <niteria@gmail.com>
Thu, 11 Feb 2016 17:45:46 +0000 (09:45 -0800)
commitdbf72dbc6e49b3db7f2337a7a41e95c1d0169163
tree42753b5a81db9f7ae7d9399da2551e20c997cd8f
parentefba41e2b3b42b7f83e9832b1102f6585cd4ca44
Build the substitution correctly in piResultTy

This fixes a bug where piResultTy created
substitutions that would violate both of the invariants
in Note [The substitution invariant].

Test Plan: ./validate --slow

Reviewers: goldfire, simonpj, austin, bgamari

Reviewed By: simonpj, bgamari

Subscribers: simonmar, thomie

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

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