- _ -> panic ("Demand.do_unpack:"++show acc++"::"++xs)
-
-show_demands wrap_args rest
- = foldr show1 rest wrap_args
- where
- show1 (WwLazy False) rest = 'L' : rest
- show1 (WwLazy True) rest = 'A' : rest
- show1 WwStrict rest = 'S' : rest
- show1 WwPrim rest = 'P' : rest
- show1 WwEnum rest = 'E' : rest
- show1 (WwUnpack nd wu args) rest = ch ++ "(" ++ showList args (')' : rest)
+ _ -> pprPanic "Demand.do_unpack:" (ppr acc <+> text ("::"++xs))
+
+
+pprDemands demands = hcat (map pprDemand demands)
+
+pprDemand (WwLazy False) = char 'L'
+pprDemand (WwLazy True) = char 'A'
+pprDemand WwStrict = char 'S'
+pprDemand WwPrim = char 'P'
+pprDemand WwEnum = char 'E'
+pprDemand (WwUnpack nd wu args) = char ch <> parens (pprDemands args)