From b965e6721c7337e7ad9e45af0a16974f3794d50c Mon Sep 17 00:00:00 2001 From: simonpj Date: Mon, 27 Nov 2000 11:04:38 +0000 Subject: [PATCH] [project @ 2000-11-27 11:04:38 by simonpj] Default methods are sys-binders --- ghc/compiler/coreSyn/CoreTidy.lhs | 1 + ghc/compiler/hsSyn/HsDecls.lhs | 5 +++-- 2 files changed, 4 insertions(+), 2 deletions(-) diff --git a/ghc/compiler/coreSyn/CoreTidy.lhs b/ghc/compiler/coreSyn/CoreTidy.lhs index a137e7a..382c79b 100644 --- a/ghc/compiler/coreSyn/CoreTidy.lhs +++ b/ghc/compiler/coreSyn/CoreTidy.lhs @@ -349,6 +349,7 @@ tidyIdInfo (_, occ_env, subst_env) is_external unfold_info id new_flavour = case flavourInfo core_idinfo of VanillaId -> ConstantId ExportedId -> ConstantId + ConstantId -> ConstantId -- e.g. Default methods DictFunId -> DictFunId flavour -> pprTrace "tidyIdInfo" (ppr id <+> ppFlavourInfo flavour) flavour diff --git a/ghc/compiler/hsSyn/HsDecls.lhs b/ghc/compiler/hsSyn/HsDecls.lhs index 64f6725..a0955a0 100644 --- a/ghc/compiler/hsSyn/HsDecls.lhs +++ b/ghc/compiler/hsSyn/HsDecls.lhs @@ -261,8 +261,9 @@ tyClDeclSysNames :: TyClDecl name pat -> [(name, SrcLoc)] -- Similar to tyClDeclNames, but returns the "implicit" -- or "system" names of the declaration -tyClDeclSysNames (ClassDecl {tcdSysNames = names, tcdLoc = loc}) - = [(n,loc) | n <- names] +tyClDeclSysNames (ClassDecl {tcdSysNames = names, tcdLoc = loc, tcdSigs = sigs}) + = [(n,loc) | n <- names] ++ + [(n,loc) | ClassOpSig _ (DefMeth n) _ loc <- sigs] tyClDeclSysNames (TyData {tcdCons = cons, tcdSysNames = names, tcdLoc = loc}) = [(n,loc) | n <- names] ++ [(wkr_name,loc) | ConDecl _ wkr_name _ _ _ loc <- cons] -- 1.7.10.4