From: simonpj Date: Mon, 7 Jan 2002 12:26:49 +0000 (+0000) Subject: [project @ 2002-01-07 12:26:49 by simonpj] X-Git-Tag: Approximately_9120_patches~314 X-Git-Url: http://git.megacz.com/?a=commitdiff_plain;h=cbc282b70e6c23df738cb11cc35652623c9aed00;p=ghc-hetmet.git [project @ 2002-01-07 12:26:49 by simonpj] Dont print (Prod [AAA]) same as (Poly Abs) --- 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}