-import Var ( Id, Var )
-import Id ( idType, idInfo, idName, idCoreRules, isGlobalId,
- isExportedId, mkVanillaGlobal, isLocalId, isNaughtyRecordSelector,
- idArity, idCafInfo, idUnfolding, isImplicitId, setIdInfo
- )
-import IdInfo {- loads of stuff -}
-import InstEnv ( Instance, DFunId, instanceDFunId, setInstanceDFunId )
-import NewDemand ( isBottomingSig, topSig )
-import BasicTypes ( Arity, isNeverActive )
-import Name ( Name, getOccName, nameOccName, mkInternalName,
- localiseName, isExternalName, nameSrcLoc, nameParent_maybe,
- isWiredInName, getName
- )
-import NameSet ( NameSet, elemNameSet )
-import IfaceEnv ( allocateGlobalBinder )
-import NameEnv ( filterNameEnv, mapNameEnv )
-import OccName ( TidyOccEnv, initTidyOccEnv, tidyOccName )
-import Type ( tidyTopType )
-import TcType ( isFFITy )
-import DataCon ( dataConName, dataConFieldLabels, dataConWrapId_maybe )
-import TyCon ( TyCon, makeTyConAbstract, tyConDataCons, isNewTyCon,
- newTyConRep, tyConSelIds, isAlgTyCon, isEnumerationTyCon )
-import Class ( classSelIds )
-import Module ( Module )
-import HscTypes ( HscEnv(..), NameCache( nsUniqs ), CgGuts(..),
- TypeEnv, typeEnvIds, typeEnvElts, typeEnvTyCons,
- extendTypeEnvWithIds, lookupTypeEnv,
- ModGuts(..), TyThing(..), ModDetails(..), Dependencies(..)
- )
-import Maybes ( orElse, mapCatMaybes )
-import ErrUtils ( showPass, dumpIfSet_core )
-import UniqSupply ( splitUniqSupply, uniqFromSupply )
-import List ( partition )
-import Maybe ( isJust )