X-Git-Url: http://git.megacz.com/?p=ghc-hetmet.git;a=blobdiff_plain;f=compiler%2Ftypecheck%2FTcMatches.lhs;h=29890a21b54973ae4237a74c39a8b515984e4728;hp=48fdf774386f1e28e1893f9a3d0a840ad665cf29;hb=HEAD;hpb=3bb700d515de2405fa5db3326482e529f332d508 diff --git a/compiler/typecheck/TcMatches.lhs b/compiler/typecheck/TcMatches.lhs index 48fdf77..29890a2 100644 --- a/compiler/typecheck/TcMatches.lhs +++ b/compiler/typecheck/TcMatches.lhs @@ -30,7 +30,7 @@ import TysWiredIn import Id import TyCon import TysPrim -import Coercion ( isIdentityCoI, mkSymCoI ) +import Coercion ( isReflCo, mkSymCo ) import Outputable import Util import SrcLoc @@ -147,7 +147,7 @@ matchFunTys matchFunTys herald arity res_ty thing_inside = do { (coi, pat_tys, res_ty) <- matchExpectedFunTys herald arity res_ty ; res <- thing_inside pat_tys res_ty - ; return (coiToHsWrapper (mkSymCoI coi), res) } + ; return (coToHsWrapper (mkSymCo coi), res) } \end{code} %************************************************************************ @@ -248,13 +248,13 @@ tcDoStmts ListComp stmts res_ty = do { (coi, elt_ty) <- matchExpectedListTy res_ty ; let list_ty = mkListTy elt_ty ; stmts' <- tcStmts ListComp (tcLcStmt listTyCon) stmts elt_ty - ; return $ mkHsWrapCoI coi (HsDo ListComp stmts' list_ty) } + ; return $ mkHsWrapCo coi (HsDo ListComp stmts' list_ty) } tcDoStmts PArrComp stmts res_ty = do { (coi, elt_ty) <- matchExpectedPArrTy res_ty ; let parr_ty = mkPArrTy elt_ty ; stmts' <- tcStmts PArrComp (tcLcStmt parrTyCon) stmts elt_ty - ; return $ mkHsWrapCoI coi (HsDo PArrComp stmts' parr_ty) } + ; return $ mkHsWrapCo coi (HsDo PArrComp stmts' parr_ty) } tcDoStmts DoExpr stmts res_ty = do { stmts' <- tcStmts DoExpr tcDoStmt stmts res_ty @@ -730,7 +730,7 @@ tcMcStmt ctxt (ParStmt bndr_stmts_s mzip_op bind_op return_op) res_ty thing_insi -- so for now we just check that it's the identity check_same actual expected = do { coi <- unifyType actual expected - ; unless (isIdentityCoI coi) $ + ; unless (isReflCo coi) $ failWithMisMatch [UnifyOrigin { uo_expected = expected , uo_actual = actual }] }