-import DataCon ( DataCon, isNullarySrcDataCon, dataConTyVars,
- mkDataCon, dataConFieldLabels, dataConOrigArgTys )
-import Var ( tyVarKind, TyVar, Id )
-import VarSet ( isEmptyVarSet, intersectVarSet, elemVarSet )
-import TysWiredIn ( unitTy )
-import BasicTypes ( RecFlag, StrictnessMark(..) )
-import Name ( Name )
-import OccName ( mkDataConWrapperOcc, mkDataConWorkerOcc, mkClassTyConOcc,
- mkClassDataConOcc, mkSuperDictSelOcc )
-import MkId ( mkDataConIds, mkRecordSelId, mkDictSelId )
-import Class ( mkClass, Class( classTyCon), FunDep, DefMeth(..) )
-import TyCon ( mkSynTyCon, mkAlgTyCon, visibleDataCons, tyConStupidTheta,
- tyConDataCons, isNewTyCon, mkClassTyCon, TyCon( tyConTyVars ),
- isRecursiveTyCon,
- ArgVrcs, AlgTyConRhs(..), newTyConRhs )
-import Type ( mkArrowKinds, liftedTypeKind, typeKind,
- tyVarsOfType, tyVarsOfTypes, tyVarsOfPred,
- splitTyConApp_maybe, splitAppTy_maybe, getTyVar_maybe,
- mkPredTys, mkTyVarTys, ThetaType, Type,
- substTyWith, zipTopTvSubst, substTheta )
-import Outputable
-import List ( nub )