From: simonpj Date: Wed, 2 Nov 2005 09:53:18 +0000 (+0000) Subject: [project @ 2005-11-02 09:53:18 by simonpj] X-Git-Tag: Initial_conversion_from_CVS_complete~92 X-Git-Url: http://git.megacz.com/?a=commitdiff_plain;ds=sidebyside;h=ca49225cd41123ab6ce229040a93cc4b993b190a;p=ghc-hetmet.git [project @ 2005-11-02 09:53:18 by simonpj] Export lists --- diff --git a/ghc/compiler/typecheck/TcExpr.lhs b/ghc/compiler/typecheck/TcExpr.lhs index f4f1e8e..a26a106 100644 --- a/ghc/compiler/typecheck/TcExpr.lhs +++ b/ghc/compiler/typecheck/TcExpr.lhs @@ -51,7 +51,7 @@ import Id ( idType, recordSelectorFieldLabel, isRecordSelector, isNaughtyRecord import DataCon ( DataCon, dataConFieldLabels, dataConStrictMarks, dataConWrapId, isVanillaDataCon, dataConTyVars, dataConOrigArgTys ) import Name ( Name ) -import TyCon ( TyCon, FieldLabel, tyConStupidTheta, tyConArity, tyConDataCons ) +import TyCon ( FieldLabel, tyConStupidTheta, tyConDataCons ) import Type ( substTheta, substTy ) import Var ( tyVarKind ) import VarSet ( emptyVarSet, elemVarSet ) @@ -69,6 +69,10 @@ import ListSetOps ( assocMaybe ) import Maybes ( catMaybes ) import Outputable import FastString + +#ifdef DEBUG +import TyCon ( tyConArity ) +#endif \end{code} %************************************************************************ @@ -948,11 +952,6 @@ tcRecordBinds data_con flds_w_tys rbinds = do { addErrTc (badFieldCon data_con field_lbl) ; return Nothing } -badFields rbinds data_con - = filter (not . (`elem` field_names)) (recBindFields rbinds) - where - field_names = dataConFieldLabels data_con - checkMissingFields :: DataCon -> HsRecordBinds Name -> TcM () checkMissingFields data_con rbinds | null field_labels -- Not declared as a record; diff --git a/ghc/compiler/typecheck/TcRnDriver.lhs b/ghc/compiler/typecheck/TcRnDriver.lhs index 9cd7164..b2e665f 100644 --- a/ghc/compiler/typecheck/TcRnDriver.lhs +++ b/ghc/compiler/typecheck/TcRnDriver.lhs @@ -62,7 +62,7 @@ import DataCon ( dataConWrapId ) import ErrUtils ( Messages, mkDumpDoc, showPass ) import Id ( Id, mkExportedLocalId, isLocalId, idName, idType ) import Var ( Var ) -import Module ( Module, ModuleEnv, mkModule, moduleEnvElts, elemModuleEnv ) +import Module ( Module, ModuleEnv, moduleEnvElts, elemModuleEnv ) import OccName ( mkVarOcc, mkOccFS, varName ) import Name ( Name, NamedThing(..), isExternalName, getSrcLoc, isWiredInName, mkExternalName )