From 4b1350ead394472cb9612a4ae81ae160c208d7e3 Mon Sep 17 00:00:00 2001 From: Ian Lynagh Date: Tue, 12 Jun 2012 02:03:14 +0100 Subject: Remove some redundant Show instances --- compiler/basicTypes/BasicTypes.lhs | 3 --- compiler/basicTypes/DataCon.lhs | 3 --- compiler/basicTypes/IdInfo.lhs | 3 --- compiler/basicTypes/Literal.lhs | 3 --- compiler/coreSyn/CoreSyn.lhs | 3 --- compiler/prelude/PrimOp.lhs | 3 --- compiler/types/Class.lhs | 3 --- 7 files changed, 21 deletions(-) (limited to 'compiler') diff --git a/compiler/basicTypes/BasicTypes.lhs b/compiler/basicTypes/BasicTypes.lhs index 98579ac4c3..6db5788d2f 100644 --- a/compiler/basicTypes/BasicTypes.lhs +++ b/compiler/basicTypes/BasicTypes.lhs @@ -572,9 +572,6 @@ instance Outputable OccInfo where | otherwise = char '*' pp_args | int_cxt = char '!' | otherwise = empty - -instance Show OccInfo where - showsPrec p occ = showsPrecSDoc p (ppr occ) \end{code} %************************************************************************ diff --git a/compiler/basicTypes/DataCon.lhs b/compiler/basicTypes/DataCon.lhs index dde85a355b..d46759c7fd 100644 --- a/compiler/basicTypes/DataCon.lhs +++ b/compiler/basicTypes/DataCon.lhs @@ -470,9 +470,6 @@ instance NamedThing DataCon where instance Outputable DataCon where ppr con = ppr (dataConName con) -instance Show DataCon where - showsPrec p con = showsPrecSDoc p (ppr con) - instance Data.Data DataCon where -- don't traverse? toConstr _ = abstractConstr "DataCon" diff --git a/compiler/basicTypes/IdInfo.lhs b/compiler/basicTypes/IdInfo.lhs index 0d715ef028..3f5eaa4b5a 100644 --- a/compiler/basicTypes/IdInfo.lhs +++ b/compiler/basicTypes/IdInfo.lhs @@ -496,9 +496,6 @@ pprLBVarInfo IsOneShotLambda = ptext (sLit "OneShot") instance Outputable LBVarInfo where ppr = pprLBVarInfo - -instance Show LBVarInfo where - showsPrec p c = showsPrecSDoc p (ppr c) \end{code} diff --git a/compiler/basicTypes/Literal.lhs b/compiler/basicTypes/Literal.lhs index fe36b9d18a..2a06c90c24 100644 --- a/compiler/basicTypes/Literal.lhs +++ b/compiler/basicTypes/Literal.lhs @@ -206,9 +206,6 @@ instance Binary Literal where instance Outputable Literal where ppr lit = pprLiteral (\d -> d) lit -instance Show Literal where - showsPrec p lit = showsPrecSDoc p (ppr lit) - instance Eq Literal where a == b = case (a `compare` b) of { EQ -> True; _ -> False } a /= b = case (a `compare` b) of { EQ -> False; _ -> True } diff --git a/compiler/coreSyn/CoreSyn.lhs b/compiler/coreSyn/CoreSyn.lhs index 40243edc0a..e52a6cfe45 100644 --- a/compiler/coreSyn/CoreSyn.lhs +++ b/compiler/coreSyn/CoreSyn.lhs @@ -963,9 +963,6 @@ instance Outputable AltCon where ppr (LitAlt lit) = ppr lit ppr DEFAULT = ptext (sLit "__DEFAULT") -instance Show AltCon where - showsPrec p con = showsPrecSDoc p (ppr con) - cmpAlt :: (AltCon, a, b) -> (AltCon, a, b) -> Ordering cmpAlt (con1, _, _) (con2, _, _) = con1 `cmpAltCon` con2 diff --git a/compiler/prelude/PrimOp.lhs b/compiler/prelude/PrimOp.lhs index 39bee1fb9d..b055376060 100644 --- a/compiler/prelude/PrimOp.lhs +++ b/compiler/prelude/PrimOp.lhs @@ -80,9 +80,6 @@ instance Ord PrimOp where instance Outputable PrimOp where ppr op = pprPrimOp op - -instance Show PrimOp where - showsPrec p op = showsPrecSDoc p (pprPrimOp op) \end{code} An @Enum@-derived list would be better; meanwhile... (ToDo) diff --git a/compiler/types/Class.lhs b/compiler/types/Class.lhs index 992fde7920..136ecec81a 100644 --- a/compiler/types/Class.lhs +++ b/compiler/types/Class.lhs @@ -237,9 +237,6 @@ instance NamedThing Class where instance Outputable Class where ppr c = ppr (getName c) -instance Show Class where - showsPrec p c = showsPrecSDoc p (ppr c) - instance Outputable DefMeth where ppr (DefMeth n) = ptext (sLit "Default method") <+> ppr n ppr (GenDefMeth n) = ptext (sLit "Generic default method") <+> ppr n -- cgit v1.2.1