- pp_info = hsep [ ptext (sLit "TopLvl=") <> ppr top
- , ptext (sLit "Arity=") <> int arity
- , ptext (sLit "Value=") <> ppr hnf
- , ptext (sLit "Cheap=") <> ppr cheap
- , ptext (sLit "Expandable=") <> ppr exp
- , ppr g ]
- pp_rhs = case g of
- UnfoldNever -> usually_empty
- UnfoldIfGoodArgs {} -> usually_empty
- _other -> ppr rhs
- usually_empty = ifPprDebug (ppr rhs)
- -- In this case show 'rhs' only in debug mode
+ pp_info = fsep $ punctuate comma
+ [ ptext (sLit "Src=") <> ppr src
+ , ptext (sLit "TopLvl=") <> ppr top
+ , ptext (sLit "Arity=") <> int arity
+ , ptext (sLit "Value=") <> ppr hnf
+ , ptext (sLit "ConLike=") <> ppr conlike
+ , ptext (sLit "Cheap=") <> ppr cheap
+ , ptext (sLit "Expandable=") <> ppr exp
+ , ptext (sLit "Guidance=") <> ppr g ]
+ pp_tmpl = ptext (sLit "Tmpl=") <+> ppr rhs
+ pp_rhs | isStableSource src = pp_tmpl
+ | otherwise = empty
+ -- Don't print the RHS or we get a quadratic
+ -- blowup in the size of the printout!
+
+instance Outputable e => Outputable (DFunArg e) where
+ ppr (DFunPolyArg e) = braces (ppr e)
+ ppr (DFunConstArg e) = ppr e
+ ppr (DFunLamArg i) = char '<' <> int i <> char '>'