From: sof Date: Mon, 26 May 1997 01:48:15 +0000 (+0000) Subject: [project @ 1997-05-26 01:48:15 by sof] X-Git-Tag: Approximately_1000_patches_recorded~554 X-Git-Url: http://git.megacz.com/?a=commitdiff_plain;h=0aad9d2d701ea5d4b1b8c6b827172bd2bb5fc65f;p=ghc-hetmet.git [project @ 1997-05-26 01:48:15 by sof] Import lists updated; use TyCon.isAlgTyCon --- diff --git a/ghc/compiler/typecheck/TcDeriv.lhs b/ghc/compiler/typecheck/TcDeriv.lhs index 3bdb454..e54b7af 100644 --- a/ghc/compiler/typecheck/TcDeriv.lhs +++ b/ghc/compiler/typecheck/TcDeriv.lhs @@ -46,17 +46,14 @@ import Maybes ( maybeToBool ) import Name ( isLocallyDefined, getSrcLoc, ExportFlag(..), Provenance, Name{--O only-}, SYN_IE(Module) ) -import Outputable ( Outputable(..){-instances e.g., (,)-} ) +import Outputable ( PprStyle(..), Outputable(..){-instances e.g., (,)-} ) import PprType ( GenType, GenTyVar, GenClass, TyCon ) -import PprStyle ( PprStyle(..) ) import Pretty ( ($$), vcat, hsep, hcat, ptext, text, char, hang, Doc ) ---import Pretty--ToDo:rm ---import FiniteMap--ToDo:rm import SrcLoc ( mkGeneratedSrcLoc, SrcLoc ) import TyCon ( tyConTyVars, tyConDataCons, tyConDerivings, tyConTheta, maybeTyConSingleCon, - isEnumerationTyCon, isDataTyCon, TyCon + isEnumerationTyCon, isAlgTyCon, TyCon ) import Type ( GenType(..), SYN_IE(TauType), mkTyVarTys, applyTyCon, mkSigmaTy, mkDictTy, isPrimType, instantiateTy, @@ -298,9 +295,8 @@ makeDerivEqns :: TcM s [DerivEqn] makeDerivEqns = tcGetEnv `thenNF_Tc` \ env -> let - local_data_tycons = filter (\tc -> isLocallyDefined tc && isDataTyCon tc) + local_data_tycons = filter (\tc -> isLocallyDefined tc && isAlgTyCon tc) (getEnv_TyCons env) - -- ToDo: what about newtypes??? in if null local_data_tycons then -- Bale out now; evalClass may not be loaded if there aren't any