Commit 12d8935e authored by simonpj@microsoft.com's avatar simonpj@microsoft.com
Browse files

Improve pretty-printing for Insts

parent 06f6f35d
......@@ -94,6 +94,7 @@ import DynFlags
import Bag
import Maybes
import Util
import Unique
import Outputable
import Data.List
import TypeRep
......@@ -602,10 +603,11 @@ pprInst i@(EqInst {tci_left = ty1, tci_right = ty2, tci_co = co})
= eitherEqInst i
(\covar -> text "Wanted" <+> ppr (TyVarTy covar) <+> dcolon <+> ppr (EqPred ty1 ty2))
(\co -> text "Given" <+> ppr co <+> dcolon <+> ppr (EqPred ty1 ty2))
pprInst inst = ppr (instName inst) <+> dcolon
pprInst inst = ppr name <> braces (pprUnique (getUnique name)) <+> dcolon
<+> (braces (ppr (instType inst) <> implicWantedEqs) $$
ifPprDebug implic_stuff)
where
name = instName inst
(implic_stuff, implicWantedEqs)
| isImplicInst inst = (ppr (tci_reft inst),
text " &" <+>
......
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