[project @ 2004-10-08 13:58:49 by simonpj]
authorsimonpj <unknown>
Fri, 8 Oct 2004 13:58:56 +0000 (13:58 +0000)
committersimonpj <unknown>
Fri, 8 Oct 2004 13:58:56 +0000 (13:58 +0000)
commit32836fa7556e79a6f1f98c4019f7daf0400ad4fd
tree829af6edea28aa0439336893d65d7329394b3973
parent982f3f1bdb754a7ca82c77c5d6f2576053fb0163
[project @ 2004-10-08 13:58:49 by simonpj]
------------------------------------------------------
Fix an interaction between zonking of Insts and GADTs
------------------------------------------------------

Insts float outwards, perhaps out of the scope of a type-refining GADT case.
So we have to make sure they are fully zonked wrt the type refinement.

tcSimplifyCheck does this, but there were two omissions
a) the tcInstStupidTheta in TcPat.tcConPat didn't get zonked
b) a Dict and Lit Inst contained an Id that wasn't zonked, to save work

To fix (b), Insts have a little less cached info; the Name is held instead
of the Id, so that the Id doesn't need to be zonked.

One test in typecheck/should_compile/tc182
ghc/compiler/typecheck/Inst.lhs
ghc/compiler/typecheck/TcMType.lhs
ghc/compiler/typecheck/TcPat.lhs
ghc/compiler/typecheck/TcRnTypes.lhs