Construct in_scope set in mkTopTCvSubst
authorBartosz Nitka <niteria@gmail.com>
Tue, 26 Jan 2016 19:26:06 +0000 (11:26 -0800)
committerBartosz Nitka <niteria@gmail.com>
Tue, 26 Jan 2016 19:29:15 +0000 (11:29 -0800)
commit144ddb414a8a4f40df1ad9ab27fcdf38f30db4d3
tree9cbb9a06a085a3e77997dc19a86ac5eb519250ca
parent6817703b31840620cca8596ca62ed70633934972
Construct in_scope set in mkTopTCvSubst

The pre-condition on `mkTopTCvSubst` turned out to be wrong and
not satisfied by any of the callers. I've fixed it, so that it
constructs the in_scope set from the range of the substitution.
`mkTopTCvSubst` was also unnecessarily general it is never called
with `CoVars`, so I changed the type signature and added an assertion.

Test Plan: ./validate --slow

Reviewers: goldfire, simonpj, bgamari, austin

Reviewed By: simonpj

Subscribers: thomie

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

GHC Trac Issues: #11371
compiler/iface/BuildTyCl.hs
compiler/main/InteractiveEval.hs
compiler/typecheck/TcFlatten.hs
compiler/typecheck/TcMType.hs
compiler/typecheck/TcSplice.hs
compiler/types/FamInstEnv.hs
compiler/types/TyCoRep.hs
compiler/types/Type.hs