import Outputable
import FastString
import Constants
+import Util
+import qualified Data.Data as Data
import Data.List( elemIndex )
\end{code}
isOpenSynTyCon tycon = isSynTyCon tycon && isOpenTyCon tycon
isDecomposableTyCon :: TyCon -> Bool
--- True iff we can deocmpose (T a b c) into ((T a b) c)
+-- True iff we can decompose (T a b c) into ((T a b) c)
-- Specifically NOT true of synonyms (open and otherwise) and coercions
isDecomposableTyCon (SynTyCon {}) = False
isDecomposableTyCon (CoTyCon {}) = False
instance NamedThing TyCon where
getName = tyConName
+
+instance Data.Typeable TyCon where
+ typeOf _ = Data.mkTyConApp (Data.mkTyCon "TyCon") []
+
+instance Data.Data TyCon where
+ -- don't traverse?
+ toConstr _ = abstractConstr "TyCon"
+ gunfold _ _ = error "gunfold"
+ dataTypeOf _ = mkNoRepType "TyCon"
\end{code}