X-Git-Url: http://git.megacz.com/?a=blobdiff_plain;f=compiler%2Ftypecheck%2FTcClassDcl.lhs;h=04a9f2b2635c58f68a52aebac6ff150f1a441f95;hb=a6f29db07ac47b8a924a65c7e07ce73bc491d0e5;hp=cb27a985f2b18d2f6ed3aa9e48a7347c06b764e7;hpb=d95ce839533391e7118257537044f01cbb1d6694;p=ghc-hetmet.git diff --git a/compiler/typecheck/TcClassDcl.lhs b/compiler/typecheck/TcClassDcl.lhs index cb27a98..04a9f2b 100644 --- a/compiler/typecheck/TcClassDcl.lhs +++ b/compiler/typecheck/TcClassDcl.lhs @@ -30,21 +30,18 @@ import TcRnMonad import Generics import Class import TyCon -import Type import MkId import Id import Name import Var import NameEnv import NameSet -import OccName import RdrName import Outputable import PrelNames import DynFlags import ErrUtils import Util -import Unique import ListSetOps import SrcLoc import Maybes @@ -224,8 +221,6 @@ tcDefMeth rigid_info clas tyvars theta this_dict binds_in sig_fn prag_fn sel_id meth_sig_fn _ = sig_fn sel_name meth_prag_fn _ = prag_fn sel_name - -- See Note [Silly default-method bind] - -- (possibly out of date) ; (top_dm_id, bind) <- tcInstanceMethodBody rigid_info clas tyvars [this_dict] theta (mkTyVarTys tyvars) Nothing sel_id @@ -368,6 +363,7 @@ gives rise to the instance declarations instance C 1 where op Unit = ... + \begin{code} mkGenericDefMethBind :: Class -> [Type] -> Id -> Name -> TcM (LHsBind Name) mkGenericDefMethBind clas inst_tys sel_id meth_name @@ -453,7 +449,7 @@ get_generics decl@(ClassDecl {tcdLName = class_name, tcdMeths = def_methods}) group `lengthExceeds` 1] get_uniq (tc,_) = getUnique tc - mapM (addErrTc . dupGenericInsts) bad_groups + mapM_ (addErrTc . dupGenericInsts) bad_groups -- Check that there is an InstInfo for each generic type constructor let