[project @ 2004-04-02 12:04:13 by simonpj]
authorsimonpj <unknown>
Fri, 2 Apr 2004 12:04:13 +0000 (12:04 +0000)
committersimonpj <unknown>
Fri, 2 Apr 2004 12:04:13 +0000 (12:04 +0000)
wibble

ghc/compiler/typecheck/TcDeriv.lhs

index 533c08a..06b1c28 100644 (file)
@@ -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