[project @ 2000-11-27 11:04:38 by simonpj]
authorsimonpj <unknown>
Mon, 27 Nov 2000 11:04:38 +0000 (11:04 +0000)
committersimonpj <unknown>
Mon, 27 Nov 2000 11:04:38 +0000 (11:04 +0000)
Default methods are sys-binders

ghc/compiler/coreSyn/CoreTidy.lhs
ghc/compiler/hsSyn/HsDecls.lhs

index a137e7a..382c79b 100644 (file)
@@ -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
index 64f6725..a0955a0 100644 (file)
@@ -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]