import Id
import TyCon
import TysPrim
-import Coercion ( isIdentityCoI, mkSymCoI )
+import Coercion ( isReflCo, mkSymCo )
import Outputable
import Util
import SrcLoc
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}
%************************************************************************
= 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
-- 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 }] }