IfaceContext, IfaceBndr(..), IfaceTvBndr, IfaceIdBndr, IfaceCoercion,
IfaceExtName(..), mkIfaceExtName, isLocalIfaceExtName,
- ifaceTyConName,
+ ifaceTyConName, ifaceTyConOccName,
-- Conversion from Type -> IfaceType
toIfaceType, toIfacePred, toIfaceContext,
#include "HsVersions.h"
-import Type ( Kind )
-import Coercion ( Coercion )
import TypeRep ( TyThing(..), Type(..), PredType(..), ThetaType,
unliftedTypeKindTyConName, openTypeKindTyConName,
ubxTupleKindTyConName, argTypeKindTyConName,
- liftedTypeKindTyConName, isLiftedTypeKind )
+ liftedTypeKindTyConName )
import TyCon ( TyCon, isTupleTyCon, tyConArity, tupleTyConBoxity, tyConName )
import Var ( isId, tyVarKind, idType )
import TysWiredIn ( listTyConName, parrTyConName, tupleTyCon, intTyConName, charTyConName, boolTyConName )
ifaceTyConName IfaceArgTypeKindTc = argTypeKindTyConName
ifaceTyConName (IfaceTc ext) = pprPanic "ifaceTyConName" (ppr ext)
-
+ifaceTyConOccName :: IfaceTyCon -> OccName -- Works for all!
+ifaceTyConOccName (IfaceTc ext) = ifaceExtOcc ext
+ifaceTyConOccName tycon = nameOccName . ifaceTyConName $ tycon
\end{code}