Type, PredType, ThetaType,
Kind, TyVarSubst,
+ TyThing(..), isTyClThing,
+
superKind, superBoxity, -- KX and BX respectively
liftedBoxity, unliftedBoxity, -- :: BX
openKindCon, -- :: KX
import {-# SOURCE #-} Subst ( substTyWith )
-- friends:
-import Var ( TyVar, tyVarKind, tyVarName, setTyVarName )
+import Var ( Id, TyVar, tyVarKind, tyVarName, setTyVarName )
import VarEnv
import VarSet
import Name ( NamedThing(..), mkInternalName, tidyOccName )
-import Class ( classTyCon )
+import Class ( Class, classTyCon )
import TyCon ( TyCon, isRecursiveTyCon, isPrimTyCon,
isUnboxedTupleTyCon, isUnLiftedTyCon,
isFunTyCon, isNewTyCon, newTyConRep,
%************************************************************************
%* *
+ TyThing
+%* *
+%************************************************************************
+
+\begin{code}
+data TyThing = AnId Id
+ | ATyCon TyCon
+ | AClass Class
+
+isTyClThing :: TyThing -> Bool
+isTyClThing (ATyCon _) = True
+isTyClThing (AClass _) = True
+isTyClThing (AnId _) = False
+
+instance NamedThing TyThing where
+ getName (AnId id) = getName id
+ getName (ATyCon tc) = getName tc
+ getName (AClass cl) = getName cl
+\end{code}
+
+
+%************************************************************************
+%* *
\subsection{Stuff to do with kinds.}
%* *
%************************************************************************