X-Git-Url: http://git.megacz.com/?p=ghc-hetmet.git;a=blobdiff_plain;f=compiler%2Ftypecheck%2FTcInstDcls.lhs;h=e186b365fa73f57eda73c559db1e9078bcb66b02;hp=1d8310cbd914f5288fb3f13a47e3d5cfa9327936;hb=d76c18e05f6366c23144624b696a02fbaa6d26e8;hpb=a1899edb87b3192f192980f392680df05f50f104 diff --git a/compiler/typecheck/TcInstDcls.lhs b/compiler/typecheck/TcInstDcls.lhs index 1d8310c..e186b36 100644 --- a/compiler/typecheck/TcInstDcls.lhs +++ b/compiler/typecheck/TcInstDcls.lhs @@ -33,7 +33,7 @@ import Type ( zipOpenTvSubst, substTheta, mkTyConApp, mkTyVarTy, splitFunTys, TyThing(ATyCon), isTyVarTy, tcEqType, substTys, emptyTvSubst, extendTvSubst ) import Coercion ( mkSymCoercion ) -import TyCon ( TyCon, tyConName, newTyConCo, tyConTyVars, +import TyCon ( TyCon, tyConName, newTyConCo_maybe, tyConTyVars, isTyConAssoc, tyConFamInst_maybe, assocTyConArgPoss_maybe ) import DataCon ( classDataCon, dataConTyCon, dataConInstArgTys ) @@ -550,7 +550,7 @@ tcInstDecl2 (InstInfo { iSpec = ispec, where -- For newtype T a = MkT -- The returned coercion has kind :: C (T a):=:C - co_fn tvs cls_tycon cls_inst_tys | Just co_con <- newTyConCo tycon + co_fn tvs cls_tycon cls_inst_tys | Just co_con <- newTyConCo_maybe tycon = ExprCoFn (mkTyConApp cls_tycon (drop_tail 1 cls_inst_tys ++ [mkSymCoercion (mkTyConApp co_con (map mkTyVarTy tvs))])) | otherwise