+ show t | TyCon.isAlgTyCon t && not (TyCon.isTupleTyCon t) =
+ showtc "AlgTyCon" ""
+ | TyCon.isCoercionTyCon t =
+ showtc "CoercionTyCon" ""
+ | TyCon.isSynTyCon t =
+ showtc "SynTyCon" (", synTcRhs = " ++ synrhs)
+ | TyCon.isTupleTyCon t =
+ showtc "TupleTyCon" ""
+ | TyCon.isFunTyCon t =
+ showtc "FunTyCon" ""
+ | TyCon.isPrimTyCon t =
+ showtc "PrimTyCon" ""
+ | TyCon.isSuperKindTyCon t =
+ showtc "SuperKindTyCon" ""
+ | otherwise =
+ "_Nonexistant tycon?:(" ++ (showSDoc $ ppr t) ++ ")_"
+ where
+ showtc con extra = "(" ++ con ++ " {tyConName = " ++ name ++ extra ++ ", ...})"
+ name = show (TyCon.tyConName t)
+ synrhs = show (TyCon.synTyConRhs t)