Commit a2a8d11f authored by simonpj@microsoft.com's avatar simonpj@microsoft.com

Improve pretty-printing for bags

parent 1dfd7734
......@@ -170,8 +170,5 @@ bagToList b = foldrBag (:) [] b
\begin{code}
instance (Outputable a) => Outputable (Bag a) where
ppr EmptyBag = ptext SLIT("emptyBag")
ppr (UnitBag a) = ppr a
ppr (TwoBags b1 b2) = hsep [ppr b1 <> comma, ppr b2]
ppr (ListBag as) = interpp'SP as
ppr bag = char '<' <> pprWithCommas ppr (bagToList bag) <> char '>'
\end{code}
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment