Remove unused imports
[ghc-hetmet.git] / compiler / typecheck / TcHsSyn.lhs
index 7e15770..7b88356 100644 (file)
@@ -35,7 +35,6 @@ import Id
 
 import TcRnMonad
 import PrelNames
-import Type
 import TcType
 import TcMType
 import TysPrim
@@ -49,7 +48,6 @@ import VarEnv
 import Literal
 import BasicTypes
 import Maybes
-import Unique
 import SrcLoc
 import Util
 import Bag
@@ -766,9 +764,9 @@ zonkRecFields env (HsRecFields flds dd)
        ; return (HsRecFields flds' dd) }
   where
     zonk_rbind fld
-      = do { new_expr <- zonkLExpr env (hsRecFieldArg fld)
-          ; return (fld { hsRecFieldArg = new_expr }) }
-       -- Field selectors have declared types; hence no zonking
+      = do { new_id   <- wrapLocM (zonkIdBndr env) (hsRecFieldId fld)
+          ; new_expr <- zonkLExpr env (hsRecFieldArg fld)
+          ; return (fld { hsRecFieldId = new_id, hsRecFieldArg = new_expr }) }
 
 -------------------------------------------------------------------------
 mapIPNameTc :: (a -> TcM b) -> IPName a -> TcM (IPName b)
@@ -823,7 +821,8 @@ zonk_pat env (AsPat (L loc v) pat)
 zonk_pat env (ViewPat expr pat ty)
   = do { expr' <- zonkLExpr env expr
        ; (env', pat') <- zonkPat env pat
-       ; return (env', ViewPat expr' pat' ty) }
+       ; ty' <- zonkTcTypeToType env ty
+       ; return (env', ViewPat expr' pat' ty') }
 
 zonk_pat env (ListPat pats ty)
   = do { ty' <- zonkTcTypeToType env ty
@@ -1071,7 +1070,7 @@ mkArbitraryType warn tv
   , isLiftedTypeKind res                       --    Horrible hack to make less use 
   = return (mkTyConApp tup_tc [])              --    of mkAnyPrimTyCon
   | otherwise
-  = do { warn (getSrcSpan tv) msg
+  = do { _ <- warn (getSrcSpan tv) msg
        ; return (mkTyConApp (mkAnyPrimTyCon (getUnique tv) kind) []) }
                -- Same name as the tyvar, apart from making it start with a colon (sigh)
                -- I dread to think what will happen if this gets out into an