From c06d51eb92e0f6e9aec92fbf658cab65e49fbbda Mon Sep 17 00:00:00 2001 From: simonpj Date: Tue, 31 Oct 2000 10:04:41 +0000 Subject: [PATCH] [project @ 2000-10-31 10:04:41 by simonpj] Error in TcDeriv --- ghc/compiler/typecheck/TcDeriv.lhs | 5 +++-- ghc/compiler/typecheck/TcModule.lhs | 2 +- 2 files changed, 4 insertions(+), 3 deletions(-) diff --git a/ghc/compiler/typecheck/TcDeriv.lhs b/ghc/compiler/typecheck/TcDeriv.lhs index 08d28dc..cd59646 100644 --- a/ghc/compiler/typecheck/TcDeriv.lhs +++ b/ghc/compiler/typecheck/TcDeriv.lhs @@ -309,12 +309,13 @@ makeDerivEqns this_mod tycons = case chk_out clas tycon of Just err -> addErrTc err `thenNF_Tc_` returnNF_Tc Nothing - Nothing -> newDFunName this_mod clas tyvar_tys locn `thenNF_Tc` \ dfun_name -> + Nothing -> newDFunName this_mod clas [ty] locn `thenNF_Tc` \ dfun_name -> returnNF_Tc (Just (dfun_name, clas, tycon, tyvars, constraints)) where clas_key = classKey clas - tyvars = tyConTyVars tycon -- ToDo: Do we need new tyvars ??? + tyvars = tyConTyVars tycon tyvar_tys = mkTyVarTys tyvars + ty = mkTyConApp tycon tyvar_tys data_cons = tyConDataCons tycon locn = getSrcLoc tycon diff --git a/ghc/compiler/typecheck/TcModule.lhs b/ghc/compiler/typecheck/TcModule.lhs index 53de077..7edd70c 100644 --- a/ghc/compiler/typecheck/TcModule.lhs +++ b/ghc/compiler/typecheck/TcModule.lhs @@ -46,7 +46,7 @@ import Module ( Module ) import Name ( Name, isLocallyDefined, toRdrName, nameEnvElts, lookupNameEnv, ) -import TyCon ( tyConGenInfo, isClassTyCon ) +import TyCon ( tyConGenInfo ) import Maybes ( thenMaybe ) import Util import BasicTypes ( EP(..), Fixity ) -- 1.7.10.4