From cbc282b70e6c23df738cb11cc35652623c9aed00 Mon Sep 17 00:00:00 2001 From: simonpj Date: Mon, 7 Jan 2002 12:26:49 +0000 Subject: [PATCH] [project @ 2002-01-07 12:26:49 by simonpj] Dont print (Prod [AAA]) same as (Poly Abs) --- ghc/compiler/basicTypes/NewDemand.lhs | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/ghc/compiler/basicTypes/NewDemand.lhs b/ghc/compiler/basicTypes/NewDemand.lhs index df46950..ea314d5 100644 --- a/ghc/compiler/basicTypes/NewDemand.lhs +++ b/ghc/compiler/basicTypes/NewDemand.lhs @@ -126,8 +126,12 @@ instance Outputable Demand where instance Outputable Demands where ppr (Poly Abs) = empty ppr (Poly d) = parens (ppr d <> char '*') - ppr (Prod ds) | all isAbsent ds = empty - | otherwise = parens (hcat (map ppr ds)) + ppr (Prod ds) = parens (hcat (map ppr ds)) + -- At one time I printed U(AAA) as U, but that + -- confuses (Poly Abs) with (Prod AAA), and the + -- worker/wrapper generation differs slightly for these two + -- [Reason: in the latter case we can avoid passing the arg; + -- see notes with WwLib.mkWWstr_one.] \end{code} -- 1.7.10.4