X-Git-Url: http://git.megacz.com/?a=blobdiff_plain;f=compiler%2Ftypecheck%2FTcHsSyn.lhs;h=7b88356cf2e2e3469b09f44a2e5cf1dca0592123;hb=2f223e8f4a4e2fb22a8bb0638cd48256e9f2f0e2;hp=7e15770270b07dcdc633c0f9b4ab11602b15a40b;hpb=1add6282808b5ae98e72ef7034634036c9b91b04;p=ghc-hetmet.git diff --git a/compiler/typecheck/TcHsSyn.lhs b/compiler/typecheck/TcHsSyn.lhs index 7e15770..7b88356 100644 --- a/compiler/typecheck/TcHsSyn.lhs +++ b/compiler/typecheck/TcHsSyn.lhs @@ -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