Commit 72edf508 authored by simonpj@microsoft.com's avatar simonpj@microsoft.com
Browse files

Better pretty-printing for IdDetails

parent 81709fc3
...@@ -277,7 +277,6 @@ instance Outputable IdDetails where ...@@ -277,7 +277,6 @@ instance Outputable IdDetails where
pprIdDetails :: IdDetails -> SDoc pprIdDetails :: IdDetails -> SDoc
pprIdDetails VanillaId = empty pprIdDetails VanillaId = empty
pprIdDetails (RecSelId {}) = ptext (sLit "[RecSel]")
pprIdDetails (DataConWorkId _) = ptext (sLit "[DataCon]") pprIdDetails (DataConWorkId _) = ptext (sLit "[DataCon]")
pprIdDetails (DataConWrapId _) = ptext (sLit "[DataConWrapper]") pprIdDetails (DataConWrapId _) = ptext (sLit "[DataConWrapper]")
pprIdDetails (ClassOpId _) = ptext (sLit "[ClassOp]") pprIdDetails (ClassOpId _) = ptext (sLit "[ClassOp]")
...@@ -285,11 +284,14 @@ pprIdDetails (PrimOpId _) = ptext (sLit "[PrimOp]") ...@@ -285,11 +284,14 @@ pprIdDetails (PrimOpId _) = ptext (sLit "[PrimOp]")
pprIdDetails (FCallId _) = ptext (sLit "[ForeignCall]") pprIdDetails (FCallId _) = ptext (sLit "[ForeignCall]")
pprIdDetails (TickBoxOpId _) = ptext (sLit "[TickBoxOp]") pprIdDetails (TickBoxOpId _) = ptext (sLit "[TickBoxOp]")
pprIdDetails DFunId = ptext (sLit "[DFunId]") pprIdDetails DFunId = ptext (sLit "[DFunId]")
pprIdDetails (RecSelId { sel_naughty = is_naughty })
= brackets $ ptext (sLit "RecSel") <> pp_naughty
where
pp_naughty | is_naughty = ptext (sLit "(naughty)")
| otherwise = empty
\end{code} \end{code}
%************************************************************************ %************************************************************************
%* * %* *
\subsection{The main IdInfo type} \subsection{The main IdInfo type}
......
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