From: simonpj Date: Fri, 2 Apr 2004 12:04:13 +0000 (+0000) Subject: [project @ 2004-04-02 12:04:13 by simonpj] X-Git-Tag: Initial_conversion_from_CVS_complete~1928 X-Git-Url: http://git.megacz.com/?a=commitdiff_plain;h=8bdc5d40deeef0b6ef532122083642d029f56c8d;hp=a4a7fd6311805eddd899d429d79c91cabba3cf9a;p=ghc-hetmet.git [project @ 2004-04-02 12:04:13 by simonpj] wibble --- diff --git a/ghc/compiler/typecheck/TcDeriv.lhs b/ghc/compiler/typecheck/TcDeriv.lhs index 533c08a..06b1c28 100644 --- a/ghc/compiler/typecheck/TcDeriv.lhs +++ b/ghc/compiler/typecheck/TcDeriv.lhs @@ -44,7 +44,7 @@ import TyCon ( tyConTyVars, tyConDataCons, tyConArity, tyConHasGenerics, tyConTheta, isProductTyCon, isDataTyCon, newTyConRhs, isEnumerationTyCon, isRecursiveTyCon, TyCon ) -import TcType ( TcType, ThetaType, mkTyVarTy, mkTyVarTys, mkTyConApp, +import TcType ( TcType, ThetaType, mkTyVarTys, mkTyConApp, getClassPredTys_maybe, tcTyConAppTyCon, isUnLiftedType, mkClassPred, tyVarsOfTypes, isArgTypeKind, tcEqTypes, tcSplitAppTys, mkAppTys, tcSplitDFunTy ) @@ -398,8 +398,7 @@ makeDerivEqns tycl_decls -- newtype A = MkA B deriving( Num ) -- We want the Num instance of B, *not* the Num instance of Int, -- when making the Num instance of A! - tyvars = tyConTyVars tycon - rep_ty = newTyConRhs tycon + (tyvars, rep_ty) = newTyConRhs tycon (rep_fn, rep_ty_args) = tcSplitAppTys rep_ty n_tyvars_to_keep = tyConArity tycon - n_args_to_drop