-import TcMType ( tcSkolSigType, checkValidInstance,
- checkValidInstHead )
-import TcType ( TcType, mkClassPred, tcSplitSigmaTy,
- tcSplitDFunHead, SkolemInfo(InstSkol),
- tcSplitTyConApp,
- tcSplitDFunTy, mkFunTy )
-import Inst ( newDictBndr, newDictBndrs, instToId, showLIE,
- getOverlapFlag, tcExtendLocalInstEnv )
-import InstEnv ( mkLocalInstance, instanceDFunId )
-import FamInst ( tcExtendLocalFamInstEnv )
-import FamInstEnv ( extractFamInsts )
-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,
- 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, dataConInstArgTys )
-import Class ( Class, classTyCon, classBigSig, classATs )
-import Var ( TyVar, Id, idName, idType, tyVarName )
-import MkId ( mkDictFunId )
-import Name ( Name, getSrcLoc, nameOccName )
-import NameSet ( addListToNameSet, emptyNameSet, minusNameSet,
- nameSetToList )
-import Maybe ( fromJust, catMaybes )
-import Monad ( when )
-import List ( find )
-import DynFlags ( DynFlag(Opt_WarnMissingMethods) )
-import SrcLoc ( srcLocSpan, unLoc, noLoc, Located(..), srcSpanStart,
- getLoc)
-import ListSetOps ( minusList )
-import Util ( snocView, dropList )