X-Git-Url: http://git.megacz.com/?a=blobdiff_plain;f=ghc%2Fcompiler%2Ftypecheck%2FTcClassDcl.lhs;h=2ebe6687336501dc7093c1f69ca54c6c88f86a46;hb=d6b7d200353e0bcc5a19a43caf252f37dee5bc6c;hp=2149943be5f66818766fd1b8fcdbc9dc4934e718;hpb=dcf829c2a86907a6c2494bae213ce7978151124b;p=ghc-hetmet.git diff --git a/ghc/compiler/typecheck/TcClassDcl.lhs b/ghc/compiler/typecheck/TcClassDcl.lhs index 2149943..2ebe668 100644 --- a/ghc/compiler/typecheck/TcClassDcl.lhs +++ b/ghc/compiler/typecheck/TcClassDcl.lhs @@ -16,7 +16,7 @@ import HsSyn ( TyClDecl(..), Sig(..), MonoBinds(..), isClassOpSig, isPragSig, placeHolderType ) -import BasicTypes ( RecFlag(..), StrictnessMark(..) ) +import BasicTypes ( RecFlag(..) ) import RnHsSyn ( RenamedTyClDecl, RenamedSig, RenamedClassOpSig, RenamedMonoBinds, maybeGenericMatch @@ -48,12 +48,11 @@ import Class ( classTyVars, classBigSig, classTyCon, import TyCon ( tyConGenInfo ) import Subst ( substTyWith ) import MkId ( mkDictSelId, mkDefaultMethodId ) -import Id ( Id, idType, idName, mkUserLocal, setIdLocalExported, setInlinePragma ) +import Id ( Id, idType, idName, mkUserLocal, setInlinePragma ) import Name ( Name, NamedThing(..) ) import NameEnv ( NameEnv, lookupNameEnv, emptyNameEnv, unitNameEnv, plusNameEnv ) import NameSet ( emptyNameSet, unitNameSet ) -import OccName ( mkClassTyConOcc, mkClassDataConOcc, mkWorkerOcc, - mkSuperDictSelOcc, reportIfUnused ) +import OccName ( mkClassTyConOcc, mkClassDataConOcc, mkSuperDictSelOcc, reportIfUnused ) import Outputable import Var ( TyVar ) import CmdLineOpts @@ -122,7 +121,7 @@ tcClassDecl1 (ClassDecl {tcdCtxt = context, tcdName = class_name, in tcExtendTyVarEnv tyvars $ - checkDefaultBinds clas op_names def_methods `thenM` \ mb_dm_env -> + checkDefaultBinds clas op_names def_methods `thenM` \ mb_dm_env -> -- CHECK THE CONTEXT -- The renamer has already checked that the context mentions @@ -150,9 +149,6 @@ tcClassDecl1 (ClassDecl {tcdCtxt = context, tcdName = class_name, sc_tys = mkPredTys sc_theta dict_component_tys = sc_tys ++ op_tys sc_sel_ids = [mkDictSelId sc_name clas | sc_name <- sc_sel_names] - -- Slightly curiously, the dictionary selectors are treated as RecordSelectorIds, - -- so they are treated as implicit Ids, but we don't give labelled fields to - -- the data constructors in tcMkDataCon datacon_name [{- No strictness -}] @@ -539,7 +535,6 @@ mkMethId :: InstOrigin -> Class -> TcM (Maybe Inst, Id) -- mkMethId instantiates the selector Id at the specified types --- THe mkMethId origin clas sel_id inst_tys = let (tyvars,rho) = tcSplitForAllTys (idType sel_id)