-import TcBinds ( mkPragFun, tcPrags, badBootDeclErr )
-import TcTyClsDecls ( tcIdxTyInstDecl )
-import TcClassDcl ( tcMethodBind, mkMethodBind, badMethodErr, badATErr,
- omittedATWarn, tcClassDecl2, getGenericInstances )
-import TcRnMonad
-import TcMType ( tcSkolSigType, checkValidInstance,
- checkValidInstHead )
-import TcType ( TcType, mkClassPred, tcSplitSigmaTy,
- tcSplitDFunHead, SkolemInfo(InstSkol),
- tcSplitDFunTy, mkFunTy )
-import Inst ( newDictBndr, newDictBndrs, instToId, showLIE,
- getOverlapFlag, tcExtendLocalInstEnv )
-import InstEnv ( mkLocalInstance, instanceDFunId )
-import TcDeriv ( tcDeriving )
-import TcEnv ( InstInfo(..), InstBindings(..),
- newDFunName, tcExtendIdEnv, tcExtendGlobalEnv
- )
-import TcHsType ( kcHsSigType, tcHsKindedType )
-import TcUnify ( checkSigTyVars )
-import TcSimplify ( tcSimplifySuperClasses )
-import Type ( zipOpenTvSubst, substTheta, mkTyConApp, mkTyVarTy,
- splitFunTys, TyThing(ATyCon), isTyVarTy, tcEqType,
- substTys, emptyTvSubst, extendTvSubst )
-import Coercion ( mkSymCoercion )
-import TyCon ( TyCon, tyConName, newTyConCo_maybe, tyConTyVars,
- isTyConAssoc, tyConFamInst_maybe,
- assocTyConArgPoss_maybe )
-import DataCon ( classDataCon, dataConTyCon, dataConInstArgTys )
-import Class ( Class, classBigSig, classATs )
-import Var ( TyVar, Id, idName, idType, tyVarKind, tyVarName )
-import VarEnv ( rnBndrs2, mkRnEnv2, emptyInScopeSet )
-import Id ( mkSysLocal )
-import UniqSupply ( uniqsFromSupply, splitUniqSupply )
-import MkId ( mkDictFunId )
-import Name ( Name, getSrcLoc, nameOccName )
-import NameSet ( addListToNameSet, emptyNameSet, minusNameSet,
- nameSetToList )
-import Maybe ( isNothing, fromJust, catMaybes )
-import Monad ( when )
-import List ( find )
-import DynFlags ( DynFlag(Opt_WarnMissingMethods) )
-import SrcLoc ( srcLocSpan, unLoc, noLoc, Located(..), srcSpanStart,
- getLoc)
-import ListSetOps ( minusList )