import HsImpExp ( pprHsVar )
import HsTypes
import NameSet ( NameSet )
-import HscTypes ( DeprecTxt )
import CoreSyn ( RuleName )
-import Kind ( Kind, pprKind )
-import BasicTypes ( Activation(..) )
+import {- Kind parts of -} Type ( Kind, pprKind )
+import BasicTypes ( Activation(..), DeprecTxt )
import ForeignCall ( CCallTarget(..), DNCallSpec, CCallConv, Safety,
CExportSpec(..), CLabelString )
-- others:
-import FunDeps ( pprFundeps )
-import Class ( FunDep )
+import Class ( FunDep, pprFundeps )
import Outputable
import Util ( count )
import SrcLoc ( Located(..), unLoc, noLoc )
isKindSigDecl other = False
-- definition of an instance of an indexed type
-isIdxTyDecl = isJust . tcdTyPats
+isIdxTyDecl tydecl
+ | isSynDecl tydecl || isDataDecl tydecl = isJust (tcdTyPats tydecl)
+ | otherwise = False
\end{code}
Dealing with names
-- We use the equality to filter out duplicate field names
tyClDeclNames (TyFunction {tcdLName = name}) = [name]
-tyClDeclNames (TySynonym {tcdLName = name,
- tcdTyPats= Nothing}) = [name]
-tyClDeclNames (TySynonym {} ) = [] -- type equation
+tyClDeclNames (TySynonym {tcdLName = name}) = [name]
tyClDeclNames (ForeignType {tcdLName = name}) = [name]
tyClDeclNames (ClassDecl {tcdLName = cls_name, tcdSigs = sigs, tcdATs = ats})