Fix scoped type variables for expression type signatures
[ghc-hetmet.git] / compiler / basicTypes / MkId.lhs
index 3e54813..3f24a85 100644 (file)
@@ -47,10 +47,10 @@ import TysPrim              ( openAlphaTyVars, alphaTyVar, alphaTy,
 import TysWiredIn      ( charTy, mkListTy )
 import PrelRules       ( primOpRules )
 import Type            ( TyThing(..), mkForAllTy, tyVarsOfTypes, 
-                         newTyConInstRhs, mkTopTvSubst, substTyVar, substTy,
+                         newTyConInstRhs, mkTopTvSubst, substTyVar, 
                          substTys, zipTopTvSubst )
 import TcGadt           ( gadtRefine, refineType, emptyRefinement )
-import HsBinds          ( ExprCoFn(..), isIdCoercion )
+import HsBinds          ( HsWrapper(..), isIdHsWrapper )
 import Coercion         ( mkSymCoercion, mkUnsafeCoercion, isEqPred )
 import TcType          ( Type, ThetaType, mkDictTy, mkPredTys, mkPredTy, 
                          mkTyConApp, mkTyVarTys, mkClassPred, isPredTy,
@@ -97,7 +97,6 @@ import NewDemand      ( mkStrictSig, DmdResult(..),
 import DmdAnal         ( dmdAnalTopRhs )
 import CoreSyn
 import Unique          ( mkBuiltinUnique, mkPrimOpIdUnique )
-import Maybe           ( fromJust )
 import Maybes
 import PrelNames
 import Util             ( dropList, isSingleton )
@@ -640,8 +639,8 @@ mkRecordSelId tycon field_label
                -- and apply to (Maybe b'), to get (Maybe b)
 
         rhs = case co_fn of
-               ExprCoFn co -> Cast (Var the_arg_id) co
-               id_co       -> ASSERT(isIdCoercion id_co) Var the_arg_id
+               WpCo co -> Cast (Var the_arg_id) co
+               id_co       -> ASSERT(isIdHsWrapper id_co) Var the_arg_id
 
        field_vs    = filter (not . isPredTy . idType) arg_vs 
        the_arg_id  = assoc "mkRecordSelId:mk_alt" (field_lbls `zip` field_vs) field_label