From ae52de4c32d1c6723420cf260847b7ad4afc2bdf Mon Sep 17 00:00:00 2001 From: simonpj Date: Mon, 28 Nov 2005 11:45:38 +0000 Subject: [PATCH 1/1] [project @ 2005-11-28 11:45:38 by simonpj] Dont try to output code for "naughty" record selectors --- ghc/compiler/main/TidyPgm.lhs | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/ghc/compiler/main/TidyPgm.lhs b/ghc/compiler/main/TidyPgm.lhs index ef3864b..86e55f9 100644 --- a/ghc/compiler/main/TidyPgm.lhs +++ b/ghc/compiler/main/TidyPgm.lhs @@ -21,7 +21,7 @@ import VarEnv import VarSet import Var ( Id, Var ) import Id ( idType, idInfo, idName, idCoreRules, isGlobalId, - isExportedId, mkVanillaGlobal, isLocalId, + isExportedId, mkVanillaGlobal, isLocalId, isNaughtyRecordSelector, idArity, idCafInfo, idUnfolding, isImplicitId, setIdInfo ) import IdInfo {- loads of stuff -} @@ -383,7 +383,10 @@ getImplicitBinds type_env where implicit_con_ids tc = mapCatMaybes dataConWrapId_maybe (tyConDataCons tc) - other_implicit_ids (ATyCon tc) = tyConSelIds tc + other_implicit_ids (ATyCon tc) = filter (not . isNaughtyRecordSelector) (tyConSelIds tc) + -- The "naughty" ones are not real functions at all + -- They are there just so we can get decent error messages + -- See Note [Naughty record selectors] in MkId.lhs other_implicit_ids (AClass cl) = classSelIds cl other_implicit_ids other = [] -- 1.7.10.4