[project @ 2003-07-21 15:14:18 by ross]
[ghc-hetmet.git] / ghc / compiler / types / PprType.lhs
index 25486d4..4a04bff 100644 (file)
@@ -19,16 +19,15 @@ module PprType(
 -- friends:
 -- (PprType can see all the representations it's trying to print)
 import TypeRep         ( Type(..), TyNote(..), Kind  ) -- friend
-import Type            ( SourceType(..), TyThing(..) )
-import TcType          ( ThetaType, PredType,
+import Type            ( SourceType(..) ) 
+import TcType          ( ThetaType, PredType, TyThing(..),
                          tcSplitSigmaTy, isPredTy, isDictTy,
                          tcSplitTyConApp_maybe, tcSplitFunTy_maybe
                        ) 
 import Var             ( TyVar, tyVarKind )
 import Class           ( Class )
 import TyCon           ( TyCon, isPrimTyCon, isTupleTyCon, tupleTyConBoxity,
-                         maybeTyConSingleCon, isEnumerationTyCon, 
-                         tyConArity, tyConName
+                         maybeTyConSingleCon, isEnumerationTyCon, tyConArity
                        )
 
 -- others:
@@ -90,9 +89,10 @@ instance Outputable name => OutputableBndr (IPName name) where
     pprBndr _ n = ppr n        -- Simple for now
 
 instance Outputable TyThing where
-  ppr (AnId   id) = ptext SLIT("AnId")   <+> ppr id
-  ppr (ATyCon tc) = ptext SLIT("ATyCon") <+> ppr tc
-  ppr (AClass cl) = ptext SLIT("AClass") <+> ppr cl
+  ppr (AnId   id)   = ptext SLIT("AnId")     <+> ppr id
+  ppr (ATyCon tc)   = ptext SLIT("ATyCon")   <+> ppr tc
+  ppr (AClass cl)   = ptext SLIT("AClass")   <+> ppr cl
+  ppr (ADataCon dc) = ptext SLIT("ADataCon") <+> ppr dc
 \end{code}
 
 
@@ -140,12 +140,6 @@ ppr_ty ctxt_prec ty@(TyConApp tycon tys)
        other          -> maybeParen ctxt_prec tYCON_PREC 
                                     (ppr tycon <+> ppr_ty tYCON_PREC ty)
 
-       -- USAGE CASE
-  | (tycon `hasKey` usOnceTyConKey || tycon `hasKey` usManyTyConKey),
-    null tys
-  =    -- For usages (! and .), always print bare OccName, without pkg/mod/uniq
-    ppr (getOccName (tyConName tycon))
-       
        -- TUPLE CASE (boxed and unboxed)
   |  isTupleTyCon tycon,
       tys `lengthIs` tyConArity tycon  -- No magic if partially applied