PrimRep(..),
tyConPrimRep,
- AlgTyConRhs(..), visibleDataCons, AlgTyConParent(..),
+ AlgTyConRhs(..), visibleDataCons,
+ AlgTyConParent(..), hasParent,
SynTyConRhs(..),
isFunTyCon, isUnLiftedTyCon, isProductTyCon,
isRecursiveTyCon, newTyConRep, newTyConRhs, newTyConCo_maybe,
isHiBootTyCon, isSuperKindTyCon,
isCoercionTyCon_maybe, isCoercionTyCon,
+ isImplicitTyCon,
tcExpandTyCon_maybe, coreExpandTyCon_maybe,
-- the representation type
-- with the type instance
+hasParent :: AlgTyConParent -> Bool
+hasParent NoParentTyCon = False
+hasParent _other = True
+
data SynTyConRhs
= OpenSynTyCon Kind -- Type family: *result* kind given
| SynonymTyCon Type -- Mentioning head type vars. Acts as a template for
= Just (ar, rule)
isCoercionTyCon_maybe other = Nothing
+isCoercionTyCon :: TyCon -> Bool
isCoercionTyCon (CoercionTyCon {}) = True
isCoercionTyCon other = False
+
+isImplicitTyCon :: TyCon -> Bool
+isImplicitTyCon SynTyCon{} = False
+isImplicitTyCon AlgTyCon{algTcParent = parent} = hasParent parent
+isImplicitTyCon other = True
+ -- catches: FunTyCon, TupleTyCon, PrimTyCon,
+ -- CoercionTyCon, SuperKindTyCon
\end{code}