From 8bdc5d40deeef0b6ef532122083642d029f56c8d Mon Sep 17 00:00:00 2001 From: simonpj Date: Fri, 2 Apr 2004 12:04:13 +0000 Subject: [PATCH] [project @ 2004-04-02 12:04:13 by simonpj] wibble --- ghc/compiler/typecheck/TcDeriv.lhs | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) 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 -- 1.7.10.4