Three improvements to Template Haskell (fixes #3467)
[ghc-hetmet.git] / compiler / typecheck / Inst.lhs
index 05762a2..a45422a 100644 (file)
@@ -62,7 +62,7 @@ import InstEnv
 import FunDeps
 import TcMType
 import TcType
-import MkCore
+import MkCore ( mkBigCoreTupTy )
 import TyCon
 import Type
 import TypeRep
@@ -867,7 +867,7 @@ lookupSimpleInst (Dict {tci_pred = pred, tci_loc = loc})
 
     { use_stage <- getStage
     ; checkWellStaged (ptext (sLit "instance for") <+> quotes (ppr pred))
-                     (topIdLvl dfun_id) use_stage
+                     (topIdLvl dfun_id) (thLevel use_stage)
 
        -- It's possible that not all the tyvars are in
        -- the substitution, tenv. For example:
@@ -1173,7 +1173,7 @@ mkEqInst (EqPred ty1 ty2) co
             ; return inst
             }
        where 
-          mkName uniq src_span = mkInternalName uniq (mkVarOcc "co") src_span
+          mkName uniq src_span = mkInternalName uniq (mkVarOcc "co_ei") src_span
 mkEqInst pred _ = pprPanic "mkEqInst" (ppr pred)
 
 mkWantedEqInst :: PredType -> TcM Inst