From 6c5705e398947a3b74a3f9b7cfb3dd93ca12b8e0 Mon Sep 17 00:00:00 2001 From: Ian Lynagh Date: Sat, 25 Nov 2006 15:23:07 +0000 Subject: [PATCH] Add some Outputable instances --- compiler/basicTypes/BasicTypes.lhs | 4 ++++ compiler/main/HscTypes.lhs | 6 ++++++ 2 files changed, 10 insertions(+) diff --git a/compiler/basicTypes/BasicTypes.lhs b/compiler/basicTypes/BasicTypes.lhs index 35c57f3..7454be9 100644 --- a/compiler/basicTypes/BasicTypes.lhs +++ b/compiler/basicTypes/BasicTypes.lhs @@ -491,6 +491,10 @@ instance Outputable StrictnessMark where \begin{code} data SuccessFlag = Succeeded | Failed +instance Outputable SuccessFlag where + ppr Succeeded = ptext SLIT("Succeeded") + ppr Failed = ptext SLIT("Failed") + successIf :: Bool -> SuccessFlag successIf True = Succeeded successIf False = Failed diff --git a/compiler/main/HscTypes.lhs b/compiler/main/HscTypes.lhs index e6e8e4c..a76ec5a 100644 --- a/compiler/main/HscTypes.lhs +++ b/compiler/main/HscTypes.lhs @@ -209,9 +209,15 @@ data TargetId pprTarget :: Target -> SDoc pprTarget (Target id _) = pprTargetId id +instance Outputable Target where + ppr = pprTarget + pprTargetId (TargetModule m) = ppr m pprTargetId (TargetFile f _) = text f +instance Outputable TargetId where + ppr = pprTargetId + type HomePackageTable = ModuleNameEnv HomeModInfo -- Domain = modules in the home package -- "home" package name cached here for convenience -- 1.7.10.4