From 995e2f4ee4673034f46ed46c0be48ff281b30dea Mon Sep 17 00:00:00 2001 From: simonmar Date: Tue, 12 Jul 2005 13:01:44 +0000 Subject: [PATCH] [project @ 2005-07-12 13:01:44 by simonmar] handle PrimTyCons in pprTyConHdr (fixes :i GHC.Base.Int# in GHCi) --- ghc/compiler/main/PprTyThing.hs | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/ghc/compiler/main/PprTyThing.hs b/ghc/compiler/main/PprTyThing.hs index 09b7af6..ecf6947 100644 --- a/ghc/compiler/main/PprTyThing.hs +++ b/ghc/compiler/main/PprTyThing.hs @@ -67,8 +67,9 @@ pprTyThingHdr exts (AClass cls) = pprClassHdr exts cls pprTyConHdr exts tyCon = ptext keyword <+> ppr_bndr tyCon <+> hsep (map ppr vars) where - vars = GHC.tyConTyVars tyCon - + vars | GHC.isPrimTyCon tyCon = take (GHC.tyConArity tyCon) GHC.alphaTyVars + | otherwise = GHC.tyConTyVars tyCon + keyword | GHC.isSynTyCon tyCon = SLIT("type") | GHC.isNewTyCon tyCon = SLIT("newtype") | otherwise = SLIT("data") -- 1.7.10.4